Skip to content

Commit

Permalink
build: update publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
LastLeaf committed Dec 2, 2024
1 parent 022615c commit 8193c1c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand All @@ -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
Expand Down

0 comments on commit 8193c1c

Please sign in to comment.