From 54eac92ca7c9fa1edd8eea897538b68969a31c22 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 17 Jan 2024 16:52:32 +0100 Subject: [PATCH] publish script cool --- publish.sh | 8 -------- scripts/publish.sh | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) delete mode 100755 publish.sh diff --git a/publish.sh b/publish.sh deleted file mode 100755 index 314ca4e..0000000 --- a/publish.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -e -PKGs=(libpt-{core,math,log,net,bintols,ccc,hedu,bin,py} libpt) -for PKG in "${PKGs[@]}"; do - echo "Package: $PKG" - cargo publish --registry cscherr -p "$PKG" - cargo publish -p "$PKG" -done diff --git a/scripts/publish.sh b/scripts/publish.sh index 61ccb7a..8dc2960 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,3 +1,10 @@ #!/bin/bash -cargo ws publish --registry cscherr --publish-as-is +set -e +cargo check --all-features +cargo ws version --no-git-commit +NEW_VERSION=$(cat Cargo.toml| rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1') +bash scripts/set_all_versions.sh $NEW_VERSION +git add -A +git commit -m "Release v$NEW_VERSION" +cargo ws publish --registry cscherr --amend --publish-as-is cargo publish --registry cscherr -p libpt