-
Notifications
You must be signed in to change notification settings - Fork 24
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
Workflow to update Dapr. #249
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Artur Souza <[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.
Just one suggestion.
Let me know if you'd like me to implement it.
Also, we should do the same for cli releases.
run: | | ||
sudo apt-get update | ||
sudo apt-get install pcre2-utils | ||
pip install packaging |
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.
pip install packaging | |
pip install semver |
I suggest we move the compare_versions.py
file from the dapr repo to this repo and update it so it uses the semver
package instead of the packaging
one that uses the PEP440 standard for version validation and comparison.
# Thanks to https://ihateregex.io/expr/semver/ | ||
SEMVER_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' | ||
REL_VERSION=`echo "${{ inputs.rel_version }}" | sed -r 's/^[vV]?([0-9].+)$/\1/'` | ||
if [ `echo $REL_VERSION | pcre2grep "$SEMVER_REGEX"` ]; then | ||
echo "$REL_VERSION is a valid semantic version." | ||
else | ||
echo "$REL_VERSION is not a valid semantic version." | ||
exit 1 | ||
fi |
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.
# Thanks to https://ihateregex.io/expr/semver/ | |
SEMVER_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' | |
REL_VERSION=`echo "${{ inputs.rel_version }}" | sed -r 's/^[vV]?([0-9].+)$/\1/'` | |
if [ `echo $REL_VERSION | pcre2grep "$SEMVER_REGEX"` ]; then | |
echo "$REL_VERSION is a valid semantic version." | |
else | |
echo "$REL_VERSION is not a valid semantic version." | |
exit 1 | |
fi | |
# Thanks to https://ihateregex.io/expr/semver/ | |
SEMVER_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' | |
REL_VERSION=`echo "${{ inputs.rel_version }}" | sed -r 's/^[vV]?([0-9].+)$/\1/'` | |
if [ `echo $REL_VERSION | pcre2grep "$SEMVER_REGEX"` ]; then | |
echo "$REL_VERSION is a valid semantic version." | |
else | |
echo "$REL_VERSION is not a valid semantic version." | |
exit 1 | |
fi |
If we accept what I suggested in the comment above, we can also remove the regex check, because it will be covered in the compare_versions.py
check below.
Description
Workflow to update Dapr runtime version in longhaul environment.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: N/A
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: