-
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.
`aws-creds —version` will show the script's actual version. The version is updated as follows: 1. for the development versions, a version is `{last tag}+{date}`; 2. a version is `{release tag}` for the release versions. The version update is managed by the Elegan Git workflows. #7
- Loading branch information
Showing
5 changed files
with
48 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
set -o errexit | ||
set -o pipefail | ||
cd "$(git rev-parse --show-toplevel)" | ||
# prepare | ||
git checkout main | ||
git pull --tags | ||
# deside on version | ||
# shellcheck disable=SC2046 # Quote this to prevent word splitt... | ||
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
echo "Commit history since the '${latest_tag}' tag:" | ||
git log "${latest_tag}"..HEAD --oneline | ||
read -r -p "What is the next version? " new_version | ||
if [[ -z ${new_version} ]]; then | ||
echo "No version provided, exiting..." | ||
exit 1 | ||
fi | ||
# update version in the script | ||
if [[ $OSTYPE == "darwin"* ]]; then | ||
# macOS system | ||
sed -i '' "s/__version__ = .*/__version__ = \"$new_version\"/" aws-creds.py | ||
else | ||
sed -i "s/__version__ = .*/__version__ = \"$new_version\"/" aws-creds.py | ||
fi | ||
git commit --interactive \ | ||
--message "Bump program version to ${new_version}" \ | ||
--message "The $(${new_version}) is set as a version for the next release." \ | ||
--message "This commit was created by the release script." |
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