11#! /bin/bash
22
3- PROJECTS=(
4- float-pigment-consistent-bincode
5- float-pigment-mlp
6- float-pigment-css-macro
7- float-pigment-css
8- float-pigment-layout
9- float-pigment-forest-macro
10- float-pigment-forest
11- float-pigment
12- )
13-
143if [ " $1 " == " " ]; then
154 echo " Missing version. Usage: $0 [VERSION]"
165 exit -1
176fi
187
198VERSION=" $1 "
9+ PROJECTS=$( egrep ' ^[ \t]*"(.+)",$' Cargo.toml | sed -E ' s/^[ \t]*"(.+)",$/\1/g' )
2010
2111# run tests
2212if cargo test ; then
6656if test -z ' $(git status --porcelain)' ; then
6757 echo ' Git status OK.'
6858
59+ # update compile cache for float-pigment-css
60+ if cargo run --bin float_pigment_css_update_version --features compile_cache; then
61+ echo ' Compile cache for float-pigment-css updated.'
62+ else
63+ echo ' Failed to update compile cache for float-pigment-css! Abort'
64+ exit -1
65+ fi
66+
6967 # update version fields in cargo.toml
7068 if sed -i ' ' -E " s/version = \" [^\" ]+\" /version = \" ${VERSION} \" /" Cargo.toml; then
7169 echo ' Modified versions in Cargo.toml.'
@@ -75,7 +73,7 @@ if test -z '$(git status --porcelain)'; then
7573 fi
7674
7775 # generate a new commit and tag it
78- if git add Cargo.toml && git commit -m " chore: update version to publish" ; then
76+ if git add Cargo.toml float-pigment-css/compile_cache && git commit -m " chore: update version to publish" ; then
7977 echo ' Generated a new version commit.'
8078 else
8179 echo ' Failed to commit! Abort.'
102100
103101# cargo publish
104102echo " Ready to publish version ${VERSION} ."
105- for PROJECT in " ${ PROJECTS[@]} " ; do
103+ for PROJECT in $ PROJECTS; do
106104 echo " "
107105 echo " Publishing ${PROJECT} ..."
108- cargo publish --no-verify - p " ${PROJECT} "
106+ cargo publish -p " ${PROJECT} "
109107done
0 commit comments