-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fix publishing bugs to crates.io
- Loading branch information
1 parent
b44d9a1
commit 0ab630c
Showing
2 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
#!/bin/bash | ||
|
||
echo "Publishing mock-it_codegen ..." | ||
cd mock-it_codegen/ | ||
cargo publish --token ${CRATES_IO_API_TOKEN} | ||
echo "Sucessfully published mock-it_codegen" | ||
crate=$1 | ||
|
||
echo "Waiting 10 seconds for mock-it_codegen to be available ..." | ||
sleep 10 | ||
case ${crate} in | ||
mock-it_codegen) | ||
cd mock-it_codegen/ | ||
echo "Publishing mock-it_codegen ..." | ||
;; | ||
mock-it) | ||
echo "Publishing mock-it ..." | ||
;; | ||
*) | ||
echo "Crate ${crate} unknown" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
echo "Publishing mock-it ..." | ||
cd ../ | ||
cargo publish --token ${CRATES_IO_API_TOKEN} | ||
echo "Sucessfully published mock-it" | ||
cargo publish --token ${CRATES_IO_API_TOKEN} || exit 1 | ||
echo "Sucessfully published ${crate}" |