Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DavidSouther
Copy link
Contributor

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.

@DavidSouther DavidSouther added Enhancement A general update to the code base. Task A general update to the code base for language clarification, missing actions, tests, etc. labels Oct 1, 2024
@DavidSouther DavidSouther marked this pull request as ready for review October 1, 2024 14:06
Copy link
Contributor

@Laren-AWS Laren-AWS left a 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`.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A general update to the code base. Task A general update to the code base for language clarification, missing actions, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use date-based build stamps for setup.py versioning
2 participants