-
-
Notifications
You must be signed in to change notification settings - Fork 632
Add DEVELOPING.md to document release. #428
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
Merged
thundergolfer
merged 3 commits into
master
from
jonathon--add-DEVELOPING-dot-md-mar2021
Mar 30, 2021
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# For Developers | ||
|
||
## Releasing | ||
|
||
Start from a clean checkout at `master`. | ||
|
||
Before running through the release it's good to run the build and the tests locally, and make sure CI is passing. You can | ||
also test-drive the commit in an existing Bazel workspace to sanity check functionality. | ||
|
||
#### Determining Semantic Version | ||
|
||
**rules_python** is currently using [Zero-based versioning](https://0ver.org/) and thus backwards-incompatible API | ||
changes still come under the minor-version digit. So releases with API changes and new features bump the minor, and | ||
those with only bug fixes and other minor changes bump the patch digit. | ||
|
||
#### Steps | ||
|
||
1. Update `version.bzl` with the new semantic version `X.Y.Z`. | ||
2. Run `bazel build //distro:rules_python-X.Y.Z` to build the distributed tarball. | ||
3. Calculate the Sha256 hash of the tarball. This hash will be used in the `http_archive` rules that download the new release. | ||
1. Example command for OSX: `shasum --algorithm 256 bazel-bin/distro/rules_python-0.1.0.tar.gz` | ||
4. Update nested examples in `examples/*/WORKSPACE` to get the new semantic version with the new `sha256` hash. | ||
5. Create commit called "Release X.Y.Z" | ||
1. ["release 0.1.0"](https://github.com/bazelbuild/rules_python/commit/c8c79aae9aa1b61d199ad03d5fe06338febd0774) is an example commit. | ||
6. Tag that commit as `X.Y.Z`. Eg. `git tag X.Y.Z` | ||
7. Push the commit and the new tag to `master`. | ||
8. Run `bazel build //distro:relnotes` from within workspace and then from repo root run `cat bazel-bin/distro/relnotes.txt` to get the 'install instructions' that are added as release notes. | ||
1. Check the `sha256` value matches the one you calculated earlier. | ||
9. ["Draft a new release"](https://github.com/bazelbuild/rules_python/releases/new) in Github (manual for now), selecting the recently pushed `X.Y.Z` tag. | ||
Upload the release artifact from `rules_python-[version].tar.gz`. Also copy the `relnotes.txt` from step 8, adding anything extra if desired. | ||
|
||
#### After release creation in Github | ||
|
||
1. Update `README.md` to point at new release. | ||
2. Ping @philwo to get the new release added to mirror.bazel.build. See [this comment on issue #400](https://github.com/bazelbuild/rules_python/issues/400#issuecomment-779159530) for more context. | ||
3. Announce the release in the #python channel in the Bazel slack (bazelbuild.slack.com). |
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.
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.
Slightly confusing that we generate a sha sum for the release and then embed it in the release commit. Shouldn't adding the new sha change the release sha?
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.
Yeah it is confusing I agree. It doesn't change the sha256 because the sha256 is added into the
examples/
directory which isn't included in the sha'd distributable. It a bit awkward to do it this way but it allows you to have one commit "release X.Y.Z" that contains the necessary version.bzl bump and also updates to the examples (and README possibly).It could be more straightforward though to just do the examples/ update in a followup commit.
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.
nice
--algorithm
instead of-a