-
Notifications
You must be signed in to change notification settings - Fork 226
Add script and Github workflow for ensuring version in sync #130
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
Add script and Github workflow for ensuring version in sync #130
Conversation
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.
Nicee! With this CI job we'll never forget to update the version in the Makefile :) ! Left one small suggestion
scripts/check-versions.sh
Outdated
fi | ||
|
||
RUNTIME_DEPENDENCY_VERSION="aws-controllers-k8s/runtime" | ||
GO_MOD_VERSION=$(cat go.mod | grep $RUNTIME_DEPENDENCY_VERSION | cut -d ' ' -f2) |
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.
nit: you can also use go list
to get the version ack/runtime
module. Some thing similar to:
go list -m -f '{{ .Version }}' github.com/aws-controllers-k8s/runtime
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.
Oh super cool! Thanks!
I was hoping we could include this into something more akin to a Git hook - so that changes would not even make it into a branch. However, Git hooks are not included in the remote repository and I didn't want to require developers to manually enable them (no-one would, probably). This was my next best option. |
fi | ||
|
||
RUNTIME_DEPENDENCY_VERSION="aws-controllers-k8s/runtime" | ||
GO_MOD_VERSION=$(go list -m -f '{{ .Version }}' github.com/aws-controllers-k8s/runtime) |
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.
GO_MOD_PATH
is not used, you can add another flag to specify the go.mod
file: -modfile $GO_MOD_PATH
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, RedbackThomson The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description of changes:
Adds a script that compares the
aws-controllers-k8s/runtime
version listed in thego.mod
is identical to theVERSION
variable in theMakefile
. This way we can ensure the generation metadata is kept in line with the version of the runtime it was built against./assign @a-hilaly
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.