From 8193c1c6114949d6e7a6f3960da8fa7a484e4da6 Mon Sep 17 00:00:00 2001 From: LastLeaf Date: Mon, 2 Dec 2024 22:05:55 +0800 Subject: [PATCH] build: update publish script --- Cargo.lock | 16 ++++++++-------- publish.sh | 12 +++++++++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fb8da6..63bb52c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -719,7 +719,7 @@ dependencies = [ [[package]] name = "float-pigment" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "float-pigment-css", "float-pigment-forest", @@ -728,7 +728,7 @@ dependencies = [ [[package]] name = "float-pigment-consistent-bincode" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "byteorder", "serde", @@ -738,7 +738,7 @@ dependencies = [ [[package]] name = "float-pigment-css" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "ahash 0.8.11", "az", @@ -770,7 +770,7 @@ dependencies = [ [[package]] name = "float-pigment-css-macro" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "proc-macro2", "quote", @@ -783,7 +783,7 @@ dependencies = [ [[package]] name = "float-pigment-forest" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "bit-vec", "cbindgen", @@ -804,7 +804,7 @@ dependencies = [ [[package]] name = "float-pigment-forest-macro" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "proc-macro2", "quote", @@ -813,7 +813,7 @@ dependencies = [ [[package]] name = "float-pigment-layout" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "android_logger", "euclid", @@ -825,7 +825,7 @@ dependencies = [ [[package]] name = "float-pigment-mlp" -version = "0.1.0" +version = "0.1.0-alpha.2" dependencies = [ "htmlstream", "regex", diff --git a/publish.sh b/publish.sh index e2d613b..f1e05c6 100755 --- a/publish.sh +++ b/publish.sh @@ -73,7 +73,7 @@ if [ -z "$(git status --porcelain)" ]; then fi # generate a new commit and tag it - if git add Cargo.toml float-pigment-css/compile_cache && git commit -m "chore: update version to publish"; then + if git add Cargo.toml Cargo.lock float-pigment-css/compile_cache && git commit -m "chore: update version to publish"; then echo 'Generated a new version commit.' else echo 'Failed to commit! Abort.' @@ -98,6 +98,16 @@ else exit -1 fi +# dry run publish to see if there is any problem +for PROJECT in $PROJECTS; do + if cargo publish --dry-run -p "${PROJECT}"; then + echo "Dry-run publishing ${PROJECT} done." + else + echo "Dry-run publishing ${PROJECT} error! Abort." + exit -1 + fi +done + # cargo publish echo "Ready to publish version ${VERSION}." for PROJECT in $PROJECTS; do