Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export SERVICE_ACCOUNT_ROLE_ARN=$(eksctl get iamserviceaccount \
```sh
export KO_DOCKER_REPO=$(./scripts/get-cfn-stack-output.sh "${DEV_INFRASTRUCTURE_STACK_NAME}" RepositoryBaseURI)

./scripts/docker-login-ecr.sh
make ecr-login
```

## 6. Build and deploy controller to EKS cluster
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ upload-resources-to-github: ## Upload contents of resources/ as part of the most

.PHONY: latest-release-tag
latest-release-tag: ## Get tag of most recent release.
@git describe --tags --abbrev=0 v2
@git describe --tags --abbrev=0 `git rev-parse --abbrev-ref HEAD`

.PHONY: previous-release-tag
previous-release-tag: ## Get tag of second most recent release.
@git describe --tags --abbrev=0 `git rev-parse --abbrev-ref HEAD`^
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elegant solution! This assumes that HEAD is the location of the release tag, which is the same assumption that GitHub will make about where to cut the release, so I like it.


.PHONY: repo-full-name
repo-full-name: ## Get the full name of the GitHub repository for Node Termination Handler.
Expand Down
6 changes: 5 additions & 1 deletion scripts/sync-readme-to-ecr-public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -euo pipefail

repo_root_path="$(cd "$(dirname "$0")"; cd ..; pwd -P)"
makefile_path="${repo_root_path}/Makefile"

if ! command -v jq; then
echo "command not found: jq" >&2
Expand Down Expand Up @@ -58,7 +59,10 @@ assert_not_empty version

#################################################

if ! (git --no-pager diff --name-only HEAD^ HEAD | grep 'README.md' >/dev/null); then
latest_release_tag="$(make -s -f "${makefile_path}" latest-release-tag)"
previous_release_tag="$(make -s -f "${makefile_path}" previous-release-tag)"

if ! (git --no-pager diff --name-only "${previous_release_tag}" "${latest_release_tag}" | grep 'README.md' >/dev/null); then
echo -e "⚠️ README.md did not change in the last commit. Not taking any action."
exit 0
fi
Expand Down