Skip to content

Commit c2170af

Browse files
committed
build: update publish script
1 parent c2718d6 commit c2170af

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
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: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ if [ -z "$(git status --porcelain)" ]; then
7272
exit -1
7373
fi
7474

75+
# run cargo check again to update cargo lock
76+
if cargo check; then
77+
echo 'Cargo check done.'
78+
else
79+
echo 'Cargo check failed! Abort.'
80+
exit -1
81+
fi
82+
7583
# generate a new commit and tag it
7684
if git add Cargo.toml Cargo.lock float-pigment-css/compile_cache && git commit -m "chore: update version to publish"; then
7785
echo 'Generated a new version commit.'
@@ -98,16 +106,6 @@ else
98106
exit -1
99107
fi
100108

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-
111109
# cargo publish
112110
echo "Ready to publish version ${VERSION}."
113111
for PROJECT in $PROJECTS; do

0 commit comments

Comments
 (0)