diff --git a/.workflows/release-work-after b/.workflows/release-work-after index b6f60f2..d69e422 100755 --- a/.workflows/release-work-after +++ b/.workflows/release-work-after @@ -8,7 +8,7 @@ COMMIT=$(git log --pretty=%H -1) if type brew >/dev/null 2>&1; then echo "Updating Homebrew formulae..." - brew bump-formula-pr --no-audit --tag=${TAG} --revision=${COMMIT} aws-creds + brew bump-formula-pr --no-audit --tag="${TAG}" --revision="${COMMIT}" aws-creds else echo "'brew' binary is not available." echo "Please make a manual formulae update." @@ -22,6 +22,7 @@ Instructions: MESSAGE fi # add GitHub release +# shellcheck disable=SC2046 # Quote this to prevent word splitt... git-elegant show-release-notes smart $(git tag | tail -2 | head -1) $(git tag | tail -1) | pbcopy echo "Release notes are in the clipboard." sleep 2 diff --git a/.workflows/release-work-ahead b/.workflows/release-work-ahead new file mode 100755 index 0000000..b2cf18e --- /dev/null +++ b/.workflows/release-work-ahead @@ -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." diff --git a/.workflows/save-work-ahead b/.workflows/save-work-ahead index a1c507e..448d42b 100755 --- a/.workflows/save-work-ahead +++ b/.workflows/save-work-ahead @@ -11,4 +11,16 @@ ruff check --config line-length=120 --fix aws-creds.py || ruff format --config line-length=120 aws-creds.py echo "Verifying 'install.sh'..." -cat install.sh | INSTALL_DIR=.install bash +INSTALL_DIR=.install bash