-
Notifications
You must be signed in to change notification settings - Fork 9
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 instructions to use YYYY.WW.REV for release versions. #100
base: main
Are you sure you want to change the base?
Conversation
a7d03e0
to
04fd29f
Compare
72b2fa5
to
76cfcb9
Compare
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.
Overall, I think this makes sense and should ease some of the pain.
I found a few issues while testing stamp.sh.
@@ -89,27 +89,14 @@ There are two stages, testing and deployment. | |||
|
|||
1. **Update the -tools version**: Once the tests pass, update the `setup.py` version and create a tag in the -tools repository at the same SHA you identified earlier. | |||
|
|||
- Determine the next [semver](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers) number as appropriate for the changes in this release. e.g. `1.1.4` | |||
- Create a local version identifier, with the format `YYYY-MM-DD-A`, where `YYYY-MM-DD` represents release date, and `-A` is used for the first release of the day (followed by `-B`, `-C`, etc., for subsequent same-day releases). e.g. `2024-08-24-A` | |||
- Determine the next [stamp](https://blog.aspect.build/versioning-releases-from-a-monorepo) (which is valid [semver](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers)) number as appropriate for the changes in this release. e.g. `2024.40.2`. |
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 description is rather opaque and the linked articles are long, but I see that it boils down to "run stamp.sh, probably with --release".
But maybe a crisper synopsis would help. Even just the comments in stamp.sh about how the tag is formed are probably enough.
|
||
# And check that the REMOTE points to the -tools repo. | ||
REMOTE="${REMOTE:origin}" | ||
if [ "$(git remote get-url $REMOTE 2>/dev/null)" != "[email protected]:awsdocs/aws-doc-sdk-examples-tools.git" ] ; then |
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 fails for me because when I run this manually I get
$ git remote get-url origin
https://github.com/awsdocs/aws-doc-sdk-examples-tools.git
NEXT=$(date +%Y.%W.0) | ||
VERSION=$(compare_versions "$CURRENT" "$NEXT") | ||
echo "Releasing $VERSION..." | ||
sed -i '' "/version=/ s/$CURRENT/$VERSION/" setup.py |
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.
The extra ''
after sed -i
makes this fail.
BRANCH=$(git rev-parse --abbrev-rev HEAD) | ||
if [ "$BRANCH" != "main" ] ; then | ||
echo "Not on main, exiting!" | ||
# exit 1 |
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.
You'll want to uncomment these.
Issue #, if available: Closes #98
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.