Skip to content

Commit

Permalink
update readme versions post-release (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
brycahta authored Nov 18, 2020
1 parent 0d8f612 commit 592a428
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ jobs:
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(GITHUB_TOKEN) IS present
script: make ekscharts-sync-release
name: Sync to EKS Charts
- stage: ReadMe Version Sync
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(GITHUB_TOKEN) IS present
script: make create-release-prep-pr-readme
name: Sync ReadMe versions
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ create-local-release-tag-patch:
create-release-prep-pr:
${MAKEFILE_PATH}/scripts/prepare-for-release

create-release-prep-pr-readme:
${MAKEFILE_PATH}/scripts/prepare-for-release -m

create-release-prep-pr-draft:
${MAKEFILE_PATH}/scripts/prepare-for-release -d

Expand Down
14 changes: 11 additions & 3 deletions scripts/prepare-for-release
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ PREVIOUS_VERSION=$(make -s -f $MAKEFILE_PATH previous-release-tag | cut -b 2- )
REPO_README=$REPO_ROOT_PATH/README.md
CHART=$REPO_ROOT_PATH/config/helm/aws-node-termination-handler/Chart.yaml
CHART_VALUES=$REPO_ROOT_PATH/config/helm/aws-node-termination-handler/values.yaml
FILES=("$REPO_README" "$CHART" "$CHART_VALUES")
# ReadMe will be updated post-release due to long NTH release time
FILES=("$CHART" "$CHART_VALUES")
FILES_CHANGED=()

# release prep
LATEST_TAG="v$LATEST_VERSION"
NEW_BRANCH="pr/$LATEST_TAG-release"
COMMIT_MESSAGE="🥑🤖 $LATEST_TAG release prep [Skip Helm E2E Tests] 🤖🥑"
COMMIT_MESSAGE="🥑🤖 $LATEST_TAG release prep 🤖🥑"

# PR details
DEFAULT_REPO_FULL_NAME=$(make -s -f $MAKEFILE_PATH repo-full-name)
Expand All @@ -43,6 +44,7 @@ HELP=$(cat << 'EOM'
Options:
-d create a draft pr
-m update versions in ReadMe only
-r target repo full name for the pr (default: aws/aws-node-termination-handler)
-h help
Expand All @@ -57,7 +59,7 @@ REPO_FULL_NAME=""
NEED_ROLLBACK=true

process_args() {
while getopts "hdr:" opt; do
while getopts "hdmr:" opt; do
case ${opt} in
h )
echo -e "$HELP" 1>&2
Expand All @@ -66,6 +68,12 @@ process_args() {
d )
DRAFT=true
;;
m )
FILES=("$REPO_README")
# release should be completed, so no longer prep
COMMIT_MESSAGE="🥑🤖 $LATEST_TAG release 🤖🥑"
PR_TITLE="🥑🤖 $LATEST_TAG release"
;;
r )
# todo: validate $REPO_FULL_NAME
REPO_FULL_NAME="${OPTARG}"
Expand Down

0 comments on commit 592a428

Please sign in to comment.