-
Notifications
You must be signed in to change notification settings - Fork 3
docs: Release process script and documentation #151
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
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
365e40f
docs: Document release process
dcalhoun 6385ce7
task: Add release script
dcalhoun ccb1533
docs: Note release script in documentation
dcalhoun c41167b
docs: Document `bin` scripts
dcalhoun f216e4e
task: Fix release script current version detection
dcalhoun 95a9664
task: Remove excessive dry run logs
dcalhoun d08339f
task: Expand release script to support all `npm version` types
dcalhoun 4d0f55e
docs: Note release documentation in README
dcalhoun 9b92a38
task: Include preid for pre-releases
dcalhoun 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
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
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,94 @@ | ||
| # Bin Directory | ||
|
|
||
| This directory contains utility scripts for the GutenbergKit project. | ||
|
|
||
| ## Scripts | ||
|
|
||
| ### `release.sh` | ||
|
|
||
| Automates the GutenbergKit release process. This script performs all the steps outlined in the [release documentation](../docs/releases.md). | ||
|
|
||
| #### Usage | ||
|
|
||
| ```bash | ||
| # Direct usage | ||
| ./bin/release.sh [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] [--dry-run] | ||
|
|
||
| # Via Makefile (recommended) | ||
| make release VERSION_TYPE=[<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] [DRY_RUN=true] | ||
| ``` | ||
|
|
||
| #### Version Types | ||
|
|
||
| | Type | Description | Example | | ||
| | -------------- | ------------------------------- | --------------------------------- | | ||
| | `major` | Increment major version | `1.2.3` → `2.0.0` | | ||
| | `minor` | Increment minor version | `1.2.3` → `1.3.0` | | ||
| | `patch` | Increment patch version | `1.2.3` → `1.2.4` | | ||
| | `premajor` | Increment major with prerelease | `1.2.3` → `2.0.0-alpha.0` | | ||
| | `preminor` | Increment minor with prerelease | `1.2.3` → `1.3.0-alpha.0` | | ||
| | `prepatch` | Increment patch with prerelease | `1.2.3` → `1.2.4-alpha.0` | | ||
| | `prerelease` | Increment prerelease version | `1.2.3-alpha.0` → `1.2.3-alpha.1` | | ||
| | `from-git` | Use version from git tag | Uses latest git tag | | ||
| | `<newversion>` | Set specific version | `1.2.3` → `1.2.3` | | ||
|
|
||
| #### Examples | ||
|
|
||
| ```bash | ||
| # Standard releases | ||
| make release VERSION_TYPE=patch | ||
| make release VERSION_TYPE=minor | ||
| make release VERSION_TYPE=major | ||
|
|
||
| # Custom version | ||
| make release VERSION_TYPE=1.2.3 | ||
|
|
||
| # Prerelease versions | ||
| make release VERSION_TYPE=premajor | ||
| make release VERSION_TYPE=preminor | ||
| make release VERSION_TYPE=prepatch | ||
| make release VERSION_TYPE=prerelease | ||
|
|
||
| # Use version from git tag | ||
| make release VERSION_TYPE=from-git | ||
|
|
||
| # Test without making changes | ||
| make release VERSION_TYPE=patch DRY_RUN=true | ||
| ``` | ||
|
|
||
| #### What it does | ||
|
|
||
| 1. **Pre-flight checks:** | ||
|
|
||
| - Verifies you're on the `trunk` branch | ||
| - Checks that your working directory is clean | ||
| - Ensures required dependencies are installed (`gh`, `npm`, `make`) | ||
|
|
||
| 2. **Release process:** | ||
| - Increments the version number in `package.json` | ||
| - Builds the project using `make build` | ||
| - Commits all changes with the version number as the commit message | ||
| - Creates a git tag with the version number | ||
| - Pushes changes to `origin/trunk` with tags | ||
| - Creates a GitHub release with auto-generated notes | ||
|
|
||
| #### Dependencies | ||
|
|
||
| - `gh` (GitHub CLI) - for creating GitHub releases | ||
| - `npm` - for version management and building | ||
| - `make` - for building the project | ||
| - Git - for version control operations | ||
|
|
||
| ### `prep-translations.js` | ||
|
|
||
| Prepares translations for the GutenbergKit project. This script is typically run as part of the build process. | ||
|
|
||
| #### Usage | ||
|
|
||
| ```bash | ||
| # Direct usage | ||
| node bin/prep-translations.js | ||
|
|
||
| # Via npm script | ||
| npm run prep-translations | ||
| ``` | ||
Oops, something went wrong.
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.
If it's going to make commits, it probably shouldn't do it while we are on
trunk. The way this is handled for app releases is that the scripts would create arelease/x.y.zbranch and make the changes there. The tag is also created from this branch. Once it's done, it'd create a PR againsttrunk.Uh oh!
There was an error while loading. Please reload this page.
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.
I agree. I consider the use of the
trunkbranch for this as a temporary solution—ideally, a short one—for avoiding PRs that create a large amount of noise due to the current VCS tracking of iOS build output.This is what I attempted to convey in the PR description: