-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update contour to 1.27.0 and Kubernetes to 1.28 #94
Conversation
Signed-off-by: Daichi Sakaue <[email protected]>
$(shell echo $1 | sed -E 's/^(.*)\.[[:digit:]]+$$/v\1/') | ||
endef | ||
|
||
# usage update-version OWNER/REPO VAR MAJOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# usage update-version OWNER/REPO VAR MAJOR | |
# usage update-version OWNER/REPO VER MAJOR |
VAR
seems to mean "version", so I think this should be VER
.
$(MAKE) update-actions | ||
$(MAKE) download-crds | ||
|
||
.PHONY: list-actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This target isn't used in other targets and doesn't appear in maintenance.md
.
When are you supposed to use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@terassyi
This is a small usable function to check the completeness of the update script.
It is not used unless we're going to use a new Action.
If you suspect it is not needed, I'll move it to my dotfiles
. How do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good for me to keep this in the file.
I just thought it might be a copy paste mistake. 🙇♂️
Signed-off-by: Daichi Sakaue <[email protected]>
sed -i -e "s/$2 := .*/$2 := $${NEW_VERSION}/g" Makefile.versions | ||
endef | ||
|
||
# usage update-version-quay NAME VAR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# usage update-version-quay NAME VAR | |
# usage update-version-quay NAME VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For update-version
and update-version-quay
, the parameter is a VAR
(variable name).
It receives a repository name and VAR
name, and write a record in Makefile.versions
.
# usage update-version OWNER/REPO VAR MAJOR
define update-version
$(call get-latest-gh,$1)
NEW_VERSION=$$(echo $(latest_gh) | if [ -z "$3" ]; then cut -b 2-; else cut -b 2; fi); \
sed -i -e "s/$2 := .*/$2 := $${NEW_VERSION}/g" Makefile.versions
endef
On the other hand, update-trusted-action
receives a specific version and overwrites GitHub Actions manifests.
# usage update-trusted-action OWNER/REPO VERSION
define update-trusted-action
for i in $(shell ls $(WORKFLOWS_DIR)); do \
$(YQ) -i '(.. | select(has("uses")) | select(.uses | contains("$1"))).uses = "$1@v$2"' $(WORKFLOWS_DIR)/$$i; \
done
endef
Therefore, their calling conventions are different:
$(call update-version,actions/checkout,ACTIONS_CHECKOUT_VERSION,1)
$(call update-version-quay,cert-manager,CERT_MANAGER_VERSION)
# The version is substituted for update-trusted-action
$(call update-trusted-action,actions/checkout,$(ACTIONS_CHECKOUT_VERSION))
Signed-off-by: Daichi Sakaue <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Daichi Sakaue [email protected]