feat: Adds release file for a reminder of whats needed, bumps our current version.
All checks were successful
CI / Ubuntu (push) Successful in 2m15s

This commit is contained in:
2024-12-26 14:51:51 -05:00
parent 47bad744d5
commit 5bac7aa577
3 changed files with 38 additions and 6 deletions

24
Release.md Normal file
View File

@@ -0,0 +1,24 @@
# Release Workflow Steps
This is a reminder of the steps used to create a release and update the homebrew formula.
> Note: These steps apply to the version hosted on `gitea`, on `github` more of these steps can be
> automated in `ci`, but there are no `macOS` host runners currently in `gitea`, so the bottles need
> built on `macOS`.
1. Update the version in `Sources/hpa/Version.swift`.
1. Tag the commit with the next version tag.
1. Push the tagged commit, this will initiate the release being created.
1. Get the `sha` of the `*.tar.gz` in the release.
1. `just get-release-sha`
1. Update the homebrew formula url, sha256, and version at top of the homebrew formula.
1. `cd $(brew --repo michael/formula)`
1. Build and generate a homebrew bottle.
1. `just bottle`
1. Update the `bottle do` section of homebrew formula with output during previous step.
1. Also make sure the `root_url` in the bottle section points to the new release.
1. Upload the bottle `*.tar.gz` file that was created to the release.
1. Generate a pull-request to the formula repo.
1. Generate a pull-request to this repo to merge into main.
1. Remove the bottle from current directory.
1. `just remove-bottles`

View File

@@ -1,2 +1,2 @@
// Do not set this variable, it is set during the build process.
let VERSION: String? = "0.1.1"
let VERSION: String? = "0.3.0"

View File

@@ -5,7 +5,8 @@ docker_tag := "test"
tap_url := "https://git.housh.dev/michael/homebrew-formula"
tap := "michael/formula"
formula := "bump-version"
release_base_url := "https://git.housh.dev/michael/bump-version/archive"
release_base_url := "https://git.housh.dev/michael/swift-bump-version/archive"
version := "$(git describe --tags --exact-match)"
[private]
default:
@@ -26,7 +27,8 @@ build configuration="debug":
--configuration {{configuration}} \
--product {{product}}
alias b := build
# Bump our version of the command-line tool.
bump-version *ARGS: (run "bump" ARGS)
# Build a docker image.
build-docker configuration="debug":
@@ -43,7 +45,9 @@ clean:
# Clean and build.
clean-build configuration="debug": clean (build configuration)
alias cb := clean-build
# Remove bottles
remove-bottles:
rm -rf *.gz
# Test locally.
test *ARGS:
@@ -53,12 +57,16 @@ test *ARGS:
test-docker: build-docker
@docker run --rm {{docker_image}}:{{docker_tag}}
# Run tests in docker without building a new image.
test-docker-without-building:
@docker run --rm {{docker_image}}:{{docker_tag}} swift test
# Show the current git-tag version.
echo-version:
@echo "VERSION: {{version}}"
# Get the sha256 sum of the release and copy to clipboard.
get-release-sha prefix="": (build "release")
version=$(.build/release/hpa --version) && \
url="{{release_base_url}}/{{prefix}}${version}.tar.gz" && \
sha=$(curl "$url" | shasum -a 256) && \
stripped="${sha% *}" && \