Skip to content

Commit 4fe2395

Browse files
committed
Update release script
Includes user agent changes done for static-alloc and makes the tagging an explicit action instead of implicit at the end. This improves interaction with CI.
1 parent f723c09 commit 4fe2395

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

release

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ determine_new_version() {
44
}
55

66
check_notexists_version() {
7+
cirrus_agent="${CIRRUS_CI/?*/(Cirrus-CI)}"
8+
final_agent="Release-Script/1.0 ${cirrus_agent:-(local)} (for static-alloc) (author:HeroicKatora)"
9+
echo $final_agent
710
# Does the api information start with: '{"errors":'
8-
[[ $(wget -U "Release-Script (for oxide-auth) (author:HeroicKatora)" "https://crates.io/api/v1/crates/oxide-auth/$new_version" -qO -) == "{\"errors\":"* ]]
11+
[[ $(wget -U "%final_agent" "https://crates.io/api/v1/crates/oxide-auth/$new_version" -qO -) == "{\"errors\":"* ]]
912
}
1013

1114
count_wip_marker() {
@@ -23,11 +26,13 @@ new_version="$(determine_new_version)"
2326
[[ -z $(grep -vE '[0-9a-zA-Z.-]*' <<< "$new_version" ) ]] || { echo "Fail: Check version number: ${new_version}"; exit 1; }
2427

2528
is_force=""
29+
do_tag=""
2630

2731
for param in $@
2832
do
2933
case "$param" in
3034
-f) is_force="-f";;
35+
--tag) do_tag="yes";;
3136
--help) ;&
3237
-h) { cat << EOF
3338
usage: release [-f] [-h|--help] <version>
@@ -70,4 +75,4 @@ check_release_changes && { echo "Fail: No changelog regarding this release"; exi
7075
# Packaging works. Note: does not publish the version.
7176
cargo package || { echo "Fail: cargo could not package successfully"; exit 1; }
7277

73-
git tag -s $is_force "v$new_version"
78+
[[ -z $do_tag ]] || git tag -s $is_force "v$new_version"

0 commit comments

Comments
 (0)