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
fix: define a two-phase release process #1163
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdelapenya
added
documentation
Docs, docs, docs.
chore
Changes that do not impact the existing functionality
labels
May 10, 2023
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
mdelapenya
commented
May 10, 2023
HofmeisterAn
previously approved these changes
May 10, 2023
Co-authored-by: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
mdelapenya
added a commit
to mdelapenya/testcontainers-go
that referenced
this pull request
May 11, 2023
* main: docs: enrich docs for modules (testcontainers#1167) chore: prepare for next minor development cycle (0.21.0) chore: use new version (v0.20.1) in modules and examples Revert "fix: don't panic when logs waits for more than 5 seconds (testcontainers#947)" (testcontainers#1164) fix: define a two-phase release process (testcontainers#1163) ci(lint): enable misspell and gci linters (testcontainers#1162)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR resolves the inconsistencies in the current release script, defining two separate phases for the release: pre-release and release.
The pre-release phase includes the modification of the files, based on the state of the version value in the
version.go
file. This version contains the next development version, and it's the value used to perform a release.Therefore, that value drives the release process to set it as the version for all downstream modules and examples.
This pre-release phase will modify the files without creating a commit, so that an eventual release engineer is able to check that the git state is correct.
Once the modified files are correct, we can safely trigger the second phase with the
release.sh
script. This script does:version.go
file with the next version, creating a commit for that.As a consequence of these changes in the release scripts, the
RELEASE.md
has been updated.Why is it important?
We do not want to mess the state of a release. A wrong git tag in the repo and an eventual fetch of the Golang proxy will cache the tag forever, causing disastrous consequences to our users, as that cached version will be there forever. This happened with the
v0.20.0
release, were the script failed in the middle but created an inconsistent state of the git tags, so I manually performed a release deleting the upstream tags.How to test this PR
To perform a release in DRY_RUN mode:
version.go
to a version of your interest: e.g. 1.0.0DRY_RUN=false ./scripts/pre-release.sh
v1.0.0
version in their go.mod files.DRY_RUN=true ./scripts/release.sh