File tree 2 files changed +20
-9
lines changed
2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 7
7
# Small utility to run update crate versions, used by godot-rust developers.
8
8
9
9
# No args specified: do everything.
10
- if [ " $# " -eq 0 ]; then
11
- echo " Usage: update-version.sh <newVersion> "
10
+ if [[ " $# " -eq 0 ] ]; then
11
+ echo " Usage: update-version.sh <VER> [--no-tag] "
12
12
exit 1
13
13
fi
14
14
15
15
# --help menu
16
16
args=(" $@ " )
17
17
for arg in " ${args[@]} " ; do
18
- if [ " $arg " == " --help" ]; then
19
- echo " Usage: update-version.sh <newVersion> "
18
+ if [[ " $arg " == " --help" ] ]; then
19
+ echo " Usage: update-version.sh <VER> [--no-tag] "
20
20
echo " "
21
21
echo " Replaces currently published version with <newVersion>" .
22
22
echo " Does not git commit."
23
23
exit 0
24
24
fi
25
+
26
+ if [[ " $arg " == " --no-tag" ]]; then
27
+ noTag=" true"
28
+ fi
25
29
done
26
30
27
31
# Uncommitted changes, see https://stackoverflow.com/a/3879077.
61
65
sed -i " s!documentation = \" https://docs.rs/godot/$oldVersion \" !documentation = \" https://docs.rs/godot/$newVersion \" !g" " $mainCargoToml " || exit 2
62
66
63
67
git commit -am " Update crate version: $oldVersion -> $newVersion " || exit 2
64
- git tag " $newVersion " || exit 2
65
68
69
+ if [[ " $noTag " == " true" ]]; then
70
+ echo " Skipped creating tag."
71
+ else
72
+ git tag " v$newVersion " || exit 2
73
+ echo " Created tag v$newVersion ."
74
+ fi
75
+
76
+ echo " "
66
77
echo " SUCCESS: Updated version $oldVersion -> $newVersion "
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ jobs:
211
211
publish :
212
212
runs-on : ubuntu-latest
213
213
if : ${{ github.event.inputs.skip-release != 'y' }}
214
- # environment: 'Crates.io'
214
+ environment : ' Crates.io'
215
215
needs :
216
216
- validation
217
217
- docs-and-commit
@@ -226,13 +226,13 @@ jobs:
226
226
run : rustup update stable
227
227
228
228
- name : " Execute crates.io publishing"
229
- # env:
230
- # CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
229
+ env :
230
+ CARGO_REGISTRY_TOKEN : ${{ secrets.CRATES_IO_TOKEN }}
231
231
run : |
232
232
IFS=' ' read -r -a publishedCrates <<< "$GDEXT_CRATES"
233
233
for crate in "${publishedCrates[@]}"; do
234
234
echo "Publish $crate..."
235
- (cd "$crate" && cargo publish --dry-run ) || {
235
+ (cd "$crate" && cargo publish -v ) || {
236
236
printf "\n::error::Failed to publish $crate\n"
237
237
exit 2
238
238
}
You can’t perform that action at this time.
0 commit comments