-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- script to update our versions after a release - cleanup some git ignore files - other minor version related doc cleanup Signed-off-by: Appu Goundan <[email protected]>
- Loading branch information
1 parent
7cc85ad
commit 27c57e5
Showing
9 changed files
with
59 additions
and
88 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# this script is simple and should work for most usecases, but it may break if we do weird things | ||
set -Eeo pipefail | ||
|
||
calculated_release_version=$(grep "^version=" gradle.properties | cut -d'=' -f2) | ||
read -r -p "Enter released version [${calculated_release_version}]: " vin | ||
release_version=${vin:-${calculated_release_version}} | ||
|
||
calculated_previous_version=$(grep "sigstore-gradle-sign-plugin" build-logic/publishing/build.gradle.kts | cut -d':' -f3 | cut -d'"' -f1) | ||
read -r -p "Enter previous version [${calculated_previous_version}]: " pvin | ||
previous_version=${pvin:-${calculated_previous_version}} | ||
|
||
calculated_next_version=$(echo "$release_version" | awk -F. -v OFS=. '{$2 += 1 ; print}') | ||
read -r -p "Enter next version [${calculated_next_version}]: " nvin | ||
next_version=${nvin:-${calculated_next_version}} | ||
|
||
echo "" | ||
echo "previous: $previous_version" | ||
echo "latest : $release_version" | ||
echo "next : $next_version" | ||
read -r -p "Run update? [y/N]: " yn | ||
go=${yn:-"n"} | ||
if [ "${go,,}" != "y" ]; then | ||
echo "aborting" | ||
exit | ||
fi | ||
|
||
# sed below is probably accepting .'s in versions as regex any chars, but this works for our purposes | ||
|
||
# updates to new release version | ||
sed -i "s/\(sigstore-gradle-sign-plugin:\)$previous_version/\1$release_version/" build-logic/publishing/build.gradle.kts | ||
sed -i "s/\(<version>\)$previous_version/\1$release_version/" sigstore-maven-plugin/README.md | ||
sed -i "s/\(dev.sigstore.sign\") version \"\)$previous_version/\1$release_version/" sigstore-gradle/README.md | ||
|
||
# update to latest dev version | ||
sed -i "s/\(sigstoreJavaVersion.convention(\"\)$release_version/\1$next_version/" sigstore-gradle/sigstore-gradle-sign-base-plugin/src/main/kotlin/dev/sigstore/sign/SigstoreSignExtension.kt | ||
sed -i "s/version=$release_version/version=$next_version/" gradle.properties |
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 was deleted.
Oops, something went wrong.