Update deployment script to update example automatically (#865)

* Update deployment script

* update examples

* Split deployment scripts

* Fixup

* Typo
This commit is contained in:
Billy Chan 2022-07-12 12:02:24 +08:00 committed by GitHub
parent 7e8c8fabe7
commit 50f42075ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 82 additions and 43 deletions

View 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"

View File

@ -1,32 +1,28 @@
#!/bin/bash
set -e
# publish `sea-orm-codegen`
cd sea-orm-codegen
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
git commit -am "sea-orm-codegen $1"
cargo publish
cd ..
sleep 30
sleep 1
# publish `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
cd ..
sleep 30
sleep 1
# publish `sea-orm-macros`
cd sea-orm-macros
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
git commit -am "sea-orm-macros $1"
cargo publish
cd ..
sleep 30
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"
cargo publish # publish sea-orm
sleep 30
sleep 1
# publish `sea-orm`
cargo publish
sleep 1
# publish `sea-orm-migration`
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"
cargo publish

View File

@ -25,7 +25,7 @@ migration = { path = "migration" }
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-async-std-native-tls",

View File

@ -25,7 +25,7 @@ migration = { path = "migration" }
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-actix-native-tls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-actix-native-tls",

View File

@ -26,7 +26,7 @@ migration = { path = "migration" }
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",

View File

@ -19,7 +19,7 @@ migration = { path = "migration" }
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"runtime-tokio-native-tls",
# "sqlx-postgres",

View File

@ -16,4 +16,4 @@ version = "^3.0.38"
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -14,7 +14,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",

View File

@ -23,7 +23,7 @@ simplelog = "*"
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",

View File

@ -19,7 +19,7 @@ migration = { path = "migration" }
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",

View File

@ -29,7 +29,7 @@ path = "../../sea-orm-rocket/lib" # remove this line in your own project and use
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"runtime-tokio-native-tls",
"sqlx-postgres",

View File

@ -15,4 +15,4 @@ rocket = { version = "0.5.0-rc.1", features = [
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -14,7 +14,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",

View File

@ -19,7 +19,7 @@ serde = "1.0"
[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version
features = [
"debug-print",
"runtime-tokio-rustls",

View File

@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }
[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm version

View File

@ -13,7 +13,7 @@ async-std = { version = "^1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "^0.8.0"
version = "^0.9.0" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-rustls",