Update deployment script to update example automatically (#865)
* Update deployment script * update examples * Split deployment scripts * Fixup * Typo
This commit is contained in:
parent
7e8c8fabe7
commit
50f42075ab
43
build-tools/bump-version.sh
Normal file
43
build-tools/bump-version.sh
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Bump `sea-orm-codegen` version
|
||||||
|
cd sea-orm-codegen
|
||||||
|
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
||||||
|
git commit -am "sea-orm-codegen $1"
|
||||||
|
cd ..
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Bump `sea-orm-cli` version
|
||||||
|
cd sea-orm-cli
|
||||||
|
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
||||||
|
sed -i 's/^sea-orm-codegen [^,]*,/sea-orm-codegen = { version = "\^'$1'",/' Cargo.toml
|
||||||
|
git commit -am "sea-orm-cli $1"
|
||||||
|
cd ..
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Bump `sea-orm-macros` version
|
||||||
|
cd sea-orm-macros
|
||||||
|
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
||||||
|
git commit -am "sea-orm-macros $1"
|
||||||
|
cd ..
|
||||||
|
sleep 1
|
||||||
|
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
||||||
|
sed -i 's/^sea-orm-macros [^,]*,/sea-orm-macros = { version = "\^'$1'",/' Cargo.toml
|
||||||
|
git commit -am "$1" # publish sea-orm
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Bump `sea-orm-migration` version
|
||||||
|
cd sea-orm-migration
|
||||||
|
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
||||||
|
sed -i 's/^sea-orm-cli [^,]*,/sea-orm-cli = { version = "\^'$1'",/' Cargo.toml
|
||||||
|
sed -i 's/^sea-orm [^,]*,/sea-orm = { version = "\^'$1'",/' Cargo.toml
|
||||||
|
git commit -am "sea-orm-migration $1"
|
||||||
|
cd ..
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Bump examples' dependency version
|
||||||
|
cd examples
|
||||||
|
find . -depth -type f -name '*.toml' -exec sed -i 's/^version = "\^.*" # sea-orm version$/version = "\^'$1'" # sea-orm version/' {} \;
|
||||||
|
find . -depth -type f -name '*.toml' -exec sed -i 's/^version = "\^.*" # sea-orm-migration version$/version = "\^'$1'" # sea-orm-migration version/' {} \;
|
||||||
|
git commit -am "update examples"
|
@ -1,32 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# publish `sea-orm-codegen`
|
||||||
cd sea-orm-codegen
|
cd sea-orm-codegen
|
||||||
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
|
||||||
git commit -am "sea-orm-codegen $1"
|
|
||||||
cargo publish
|
cargo publish
|
||||||
cd ..
|
cd ..
|
||||||
sleep 30
|
sleep 1
|
||||||
|
|
||||||
|
# publish `sea-orm-cli`
|
||||||
cd sea-orm-cli
|
cd sea-orm-cli
|
||||||
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
|
||||||
sed -i 's/^sea-orm-codegen [^,]*,/sea-orm-codegen = { version = "\^'$1'",/' Cargo.toml
|
|
||||||
git commit -am "sea-orm-cli $1"
|
|
||||||
cargo publish
|
cargo publish
|
||||||
cd ..
|
cd ..
|
||||||
sleep 30
|
sleep 1
|
||||||
|
|
||||||
|
# publish `sea-orm-macros`
|
||||||
cd sea-orm-macros
|
cd sea-orm-macros
|
||||||
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
|
||||||
git commit -am "sea-orm-macros $1"
|
|
||||||
cargo publish
|
cargo publish
|
||||||
cd ..
|
cd ..
|
||||||
sleep 30
|
sleep 1
|
||||||
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
|
||||||
sed -i 's/^sea-orm-macros [^,]*,/sea-orm-macros = { version = "\^'$1'",/' Cargo.toml
|
# publish `sea-orm`
|
||||||
git commit -am "$1"
|
cargo publish
|
||||||
cargo publish # publish sea-orm
|
sleep 1
|
||||||
sleep 30
|
|
||||||
cd sea-orm-migration
|
# publish `sea-orm-migration`
|
||||||
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
|
cd sea-orm-migration
|
||||||
sed -i 's/^sea-orm-cli [^,]*,/sea-orm-cli = { version = "\^'$1'",/' Cargo.toml
|
|
||||||
sed -i 's/^sea-orm [^,]*,/sea-orm = { version = "\^'$1'",/' Cargo.toml
|
|
||||||
git commit -am "sea-orm-migration $1"
|
|
||||||
cargo publish
|
cargo publish
|
@ -25,7 +25,7 @@ migration = { path = "migration" }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-async-std-native-tls",
|
"runtime-async-std-native-tls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-async-std-native-tls",
|
# "runtime-async-std-native-tls",
|
||||||
|
@ -25,7 +25,7 @@ migration = { path = "migration" }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-actix-native-tls",
|
"runtime-actix-native-tls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-actix-native-tls",
|
# "runtime-actix-native-tls",
|
||||||
|
@ -26,7 +26,7 @@ migration = { path = "migration" }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-tokio-native-tls",
|
"runtime-tokio-native-tls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-native-tls",
|
# "runtime-tokio-native-tls",
|
||||||
|
@ -19,7 +19,7 @@ migration = { path = "migration" }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"runtime-tokio-native-tls",
|
"runtime-tokio-native-tls",
|
||||||
# "sqlx-postgres",
|
# "sqlx-postgres",
|
||||||
|
@ -16,4 +16,4 @@ version = "^3.0.38"
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -14,7 +14,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-native-tls",
|
# "runtime-tokio-native-tls",
|
||||||
|
@ -23,7 +23,7 @@ simplelog = "*"
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-tokio-native-tls",
|
"runtime-tokio-native-tls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-native-tls",
|
# "runtime-tokio-native-tls",
|
||||||
|
@ -19,7 +19,7 @@ migration = { path = "migration" }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-tokio-native-tls",
|
"runtime-tokio-native-tls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-native-tls",
|
# "runtime-tokio-native-tls",
|
||||||
|
@ -29,7 +29,7 @@ path = "../../sea-orm-rocket/lib" # remove this line in your own project and use
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"runtime-tokio-native-tls",
|
"runtime-tokio-native-tls",
|
||||||
"sqlx-postgres",
|
"sqlx-postgres",
|
||||||
|
@ -15,4 +15,4 @@ rocket = { version = "0.5.0-rc.1", features = [
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -14,7 +14,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-native-tls",
|
# "runtime-tokio-native-tls",
|
||||||
|
@ -19,7 +19,7 @@ serde = "1.0"
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../" # remove this line in your own project
|
path = "../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
features = [
|
features = [
|
||||||
"debug-print",
|
"debug-print",
|
||||||
"runtime-tokio-rustls",
|
"runtime-tokio-rustls",
|
||||||
|
@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../../" # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm version
|
||||||
|
@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
|
|||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
path = "../../../sea-orm-migration" # remove this line in your own project
|
path = "../../../sea-orm-migration" # remove this line in your own project
|
||||||
version = "^0.8.0"
|
version = "^0.9.0" # sea-orm-migration version
|
||||||
features = [
|
features = [
|
||||||
# Enable following runtime and db backend features if you want to run migration via CLI
|
# Enable following runtime and db backend features if you want to run migration via CLI
|
||||||
# "runtime-tokio-rustls",
|
# "runtime-tokio-rustls",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user