Skip to content

Commit 8193c1c

Browse files
committed
build: update publish script
1 parent 022615c commit 8193c1c

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

publish.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ if [ -z "$(git status --porcelain)" ]; then
7373
fi
7474

7575
# generate a new commit and tag it
76-
if git add Cargo.toml float-pigment-css/compile_cache && git commit -m "chore: update version to publish"; then
76+
if git add Cargo.toml Cargo.lock float-pigment-css/compile_cache && git commit -m "chore: update version to publish"; then
7777
echo 'Generated a new version commit.'
7878
else
7979
echo 'Failed to commit! Abort.'
@@ -98,6 +98,16 @@ else
9898
exit -1
9999
fi
100100

101+
# dry run publish to see if there is any problem
102+
for PROJECT in $PROJECTS; do
103+
if cargo publish --dry-run -p "${PROJECT}"; then
104+
echo "Dry-run publishing ${PROJECT} done."
105+
else
106+
echo "Dry-run publishing ${PROJECT} error! Abort."
107+
exit -1
108+
fi
109+
done
110+
101111
# cargo publish
102112
echo "Ready to publish version ${VERSION}."
103113
for PROJECT in $PROJECTS; do

0 commit comments

Comments
 (0)