-
-
Notifications
You must be signed in to change notification settings - Fork 6
chore(boil): Add release script and changelog #1303
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 2 commits
Commits
Show all changes
4 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,56 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| MESSAGE="# Managed by .scripts\/release_boil.sh" | ||
|
|
||
| BUMPED_VERSION=$(git-cliff --config rust/boil/cliff.toml --bumped-version) | ||
| CLEANED_BUMPED_VERSION=${BUMPED_VERSION#boil-} | ||
|
|
||
| RELEASE_BRANCH="chore/boil-release-$CLEANED_BUMPED_VERSION" | ||
|
|
||
| # echo "Checking if working directory is clean" | ||
| if ! git diff-index --quiet HEAD --; then | ||
| echo "Working directory is dirty, aborting" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Switch to main branch after we validated that the working directory is clean | ||
| git switch main | ||
|
|
||
| # Make sure we have the latest remote changes locally | ||
| git pull | ||
|
|
||
| echo "Creating and switching to $RELEASE_BRANCH branch" | ||
| git switch -c "$RELEASE_BRANCH" | ||
|
|
||
| echo "Generating updated changelog for $BUMPED_VERSION" | ||
| git-cliff --config rust/boil/cliff.toml --tag "$BUMPED_VERSION" > rust/boil/CHANGELOG.md | ||
|
|
||
| echo "Updating the version to $CLEANED_BUMPED_VERSION in the Cargo.toml file" | ||
| sed -E -i "s/^version = .* $MESSAGE$/version = \"$CLEANED_BUMPED_VERSION\" $MESSAGE/" rust/boil/Cargo.toml | ||
|
|
||
| echo "Committing changes" | ||
| # Make sure that there are changes to be committed | ||
| if git diff-index --quiet HEAD --; then | ||
| echo "No changes to commit" | ||
| exit 1 | ||
| fi | ||
|
|
||
| git add rust/boil/CHANGELOG.md rust/boil/Cargo.toml | ||
| git commit --message "chore(boil): Release $CLEANED_BUMPED_VERSION" --no-verify --gpg-sign | ||
|
|
||
| echo "Pushing changes and raising PR" | ||
| CHANGELOG_SUMMARY=$(git-cliff --config rust/boil/cliff.toml --tag "$BUMPED_VERSION" --strip header --unreleased) | ||
| PR_BODY="This PR was raised automatically by a release script. It releases $BUMPED_VERSION:\n\n$CHANGELOG_SUMMARY)" | ||
|
|
||
| git push --set-upstream origin "$RELEASE_BRANCH" | ||
| gh pr create --base main \ | ||
NickLarsenNZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --title "chore(boil): Release $CLEANED_BUMPED_VERSION" \ | ||
| --body "$PR_BODY" \ | ||
| --assignee "@me" \ | ||
| --draft | ||
|
|
||
| echo "After merging the PR, make sure to run the following commands to finish up the release:" | ||
| echo "git switch main && git pull" | ||
| echo "git tag -s $BUMPED_VERSION" -m "$BUMPED_VERSION" | ||
| echo "git push --follow-tags" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,37 @@ | ||
| <!-- GENERATED BY GIT-CLIFF, DO NOT EDIT MANUALLY --> | ||
|
|
||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Features | ||
|
|
||
| - Support Containerfiles per version ([#1302](https://github.com/stackabletech/docker-images/pull/1302)). | ||
|
|
||
| ## [[0.1.4](https://github.com/stackabletech/docker-images/compare/boil-0.1.3..boil-0.1.4)] - 2025-09-30 | ||
NickLarsenNZ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| - Revert accidental default registry change from #1281 ([#1288](https://github.com/stackabletech/docker-images/pull/1288)). | ||
|
|
||
| ## [[0.1.3](https://github.com/stackabletech/docker-images/compare/boil-0.1.2..boil-0.1.3)] - 2025-09-29 | ||
|
|
||
| ### Features | ||
|
|
||
| - Add support for port in registry host ([#1281](https://github.com/stackabletech/docker-images/pull/1281)). | ||
|
|
||
| ## [[0.1.2](https://github.com/stackabletech/docker-images/compare/boil-0.1.1..boil-0.1.2)] - 2025-09-18 | ||
|
|
||
| ### Features | ||
|
|
||
| - Add support for Nushell completions ([#1259](https://github.com/stackabletech/docker-images/pull/1259)). | ||
|
|
||
| ## [0.1.1] - 2025-09-16 | ||
|
|
||
| ### Bug Fixes | ||
|
|
||
| - Return error if docker child process fails ([#1252](https://github.com/stackabletech/docker-images/pull/1252)). | ||
|
|
||
| <!-- GENERATED BY GIT-CLIFF, DO NOT EDIT MANUALLY --> | ||
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,12 @@ | ||
| # Release Process | ||
|
|
||
| To release a new version of `boil` the following steps need to be done: | ||
|
|
||
| 1. Make sure the local `main` branch is up-to-date and in a clean state. | ||
| 2. Run the `.scripts/release_boil.sh` script. This takes care of | ||
| - generating the changelog | ||
| - updating the `Cargo.toml` version | ||
| - raising a PR with the changes | ||
| 3. Merge the PR. | ||
| 4. Add the appropriate tag on `main` by running `git tag -s`. | ||
| 5. Push the tag. |
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,81 @@ | ||
| [bump] | ||
| # We set this to false, because we currently use a 0.X.X version. Features will thus only bump the | ||
| # patch-level version. | ||
| features_always_bump_minor = false | ||
|
|
||
| # We set this to false, because we currently use a 0.X.X version. Breaking changes will thus only | ||
| # bump the minor version. | ||
| breaking_always_bump_major = false | ||
|
|
||
| initial_tag = "0.1.0" | ||
|
|
||
| [git] | ||
| # All commits should be parsed as conventional commits. | ||
| conventional_commits = true | ||
|
|
||
| # All unconventional commits are filtered out and ignored. | ||
| filter_unconventional = true | ||
|
|
||
| # Commits listed in the changelog are sorted from newest to oldest. | ||
| sort_commits = "newest" | ||
|
|
||
| # Filter and ignore all commits NOT matched by the commit parsers below. | ||
| filter_commits = true | ||
|
|
||
| commit_parsers = [ | ||
| { message = "^feat\\(boil\\)", group = "<!-- 0 --> Features" }, | ||
| { message = "^fix\\(boil\\)", group = "<!-- 1 --> Bug Fixes" }, | ||
| { message = "^docs?\\(boil\\)", group = "<!-- 2 --> Documentation" }, | ||
| { message = "^(perf|refactor|test)\\(boil\\)", group = "<!-- 3 --> Improvements" }, | ||
| { message = "^chore\\(boil\\): Improve", group = "<!-- 3 --> Improvements" }, | ||
| { message = "^chore\\(boil\\)", group = "<!-- 4 --> Miscellaneous" }, | ||
| { message = "^chore\\(boil\\): Release", skip = true }, | ||
| ] | ||
|
|
||
| commit_preprocessors = [ | ||
| # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. | ||
| { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/pull/${2}))" }, | ||
| ] | ||
|
|
||
| # Only consider the 'boil-' Git tags when generating the changelog | ||
| tag_pattern = "boil-[0-9]*.[0-9]*.[0-9]*" | ||
|
|
||
| # Ignore the first release tag | ||
| skip_tags = "boil-0.1.0" | ||
|
|
||
| [changelog] | ||
| trim = true | ||
|
|
||
| postprocessors = [ | ||
| # Replace the placeholder `<REPO>` with a URL. | ||
| { pattern = '<REPO>', replace = "https://github.com/stackabletech/docker-images" }, | ||
| ] | ||
|
|
||
| header = """<!-- GENERATED BY GIT-CLIFF, DO NOT EDIT MANUALLY --> | ||
|
|
||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| """ | ||
|
|
||
| body = """ | ||
| {% if version %}\ | ||
| {% if previous.version %}\ | ||
| ## [[{{ version | trim_start_matches(pat="boil-") }}]\ | ||
| (<REPO>/compare/{{ previous.version }}..{{ version }})] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
| {% else %}\ | ||
| ## [{{ version | trim_start_matches(pat="boil-") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
| {% endif %}\ | ||
| {% else %}\ | ||
| ## [Unreleased] | ||
| {% endif %}\ | ||
| {% for group, commits in commits | group_by(attribute="group") %} | ||
| ### {{ group | striptags | trim | upper_first }} | ||
| {% for commit in commits %} | ||
| - {% if commit.breaking %}**BREAKING:** {% endif %}{{ commit.message | upper_first -}}. | ||
| {% endfor %} | ||
| {% endfor %}\ | ||
| """ | ||
|
|
||
| footer = "<!-- GENERATED BY GIT-CLIFF, DO NOT EDIT MANUALLY -->" |
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.
Uh oh!
There was an error while loading. Please reload this page.