diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b6af6..9b01a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.1.0] - 2026-07-25 +## [1.0.0-beta.1] - 2026-07-26 + +First public beta. Ships the full 1.0.0 feature set (below) as prebuilt +binaries for linux and darwin on amd64/arm64, for testing ahead of the +1.0.0 final. + +### Changed + +- Canonicalized the module path to `github.com/z19r/tihole` so + `go install github.com/z19r/tihole/cmd/tihole` resolves. + +### Added + +- MIT license. + +## [1.0.0] - 2026-07-25 ### Added @@ -29,5 +44,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 failures. - ASCII boot splash shown before the dashboard. -[Unreleased]: https://github.com/z19r/tihole/compare/v0.1.0...HEAD -[0.1.0]: https://github.com/z19r/tihole/releases/tag/v0.1.0 +[Unreleased]: https://github.com/z19r/tihole/compare/v1.0.0-beta.1...HEAD +[1.0.0-beta.1]: https://github.com/z19r/tihole/releases/tag/v1.0.0-beta.1 +[1.0.0]: https://github.com/z19r/tihole/releases/tag/v1.0.0 diff --git a/VERSION b/VERSION index 6e8bf73..3eefcb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +1.0.0 diff --git a/justfile b/justfile index 3b962dc..28de9bd 100644 --- a/justfile +++ b/justfile @@ -148,3 +148,61 @@ release LEVEL: echo "" echo "Committed and tagged v${NEW}." echo "Push with: git push origin main && git push origin v${NEW}" + +# Cut a prerelease (beta) of the CURRENT VERSION: vX.Y.Z-beta.N. +# The beta number auto-increments from existing tags. VERSION is left +# untouched — betas lead up to the same X.Y.Z final. Usage: just prerelease +prerelease: + #!/usr/bin/env bash + set -euo pipefail + if [[ -n "$(git status --porcelain)" ]]; then + echo "Error: dirty working tree"; exit 1 + fi + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [[ "$BRANCH" != "main" ]]; then + echo "Error: prerelease must run from main (on $BRANCH)"; exit 1 + fi + # Release quality gate. + go build ./... + go vet ./... + go test ./... + # Beta of the current base version; next N from existing beta tags. + BASE=$(tr -d '[:space:]' < VERSION) + LAST=$(git tag -l "v${BASE}-beta.*" \ + | sed "s/^v${BASE}-beta\.//" | sort -n | tail -1) + if [[ -z "${LAST:-}" ]]; then N=1; else N=$((LAST + 1)); fi + PRE="${BASE}-beta.${N}" + if git rev-parse -q --verify "refs/tags/v${PRE}" >/dev/null; then + echo "Error: tag v${PRE} already exists"; exit 1 + fi + TODAY=$(date -u +%Y-%m-%d) + echo "Cutting prerelease v${PRE}" + # Promote [Unreleased] into a dated beta section, leaving a fresh + # empty Unreleased at the top. VERSION is intentionally not changed. + awk -v ver="$PRE" -v today="$TODAY" ' + /^## \[Unreleased\]/ && !done { + print "## [Unreleased]" + print "" + print "## [" ver "] - " today + done = 1 + next + } + { print } + ' CHANGELOG.md > CHANGELOG.md.tmp + mv CHANGELOG.md.tmp CHANGELOG.md + # Refresh the link-reference footer. + REPO="https://github.com/z19r/tihole" + if grep -q '^\[Unreleased\]:' CHANGELOG.md; then + sed -i "s#^\[Unreleased\]:.*#[Unreleased]: ${REPO}/compare/v${PRE}...HEAD#" \ + CHANGELOG.md + printf '[%s]: %s/releases/tag/v%s\n' "$PRE" "$REPO" "$PRE" \ + >> CHANGELOG.md + fi + # Regenerate the site changelog from the promoted CHANGELOG.md. + go run {{ pkg }} changelog-sync + git add CHANGELOG.md site/src/changelog.js + git commit -m "release: v${PRE}" + git tag "v${PRE}" + echo "" + echo "Committed and tagged v${PRE} (VERSION stays ${BASE})." + echo "Push with: git push origin main && git push origin v${PRE}" diff --git a/site/src/changelog.js b/site/src/changelog.js index de98c2c..2487d8b 100644 --- a/site/src/changelog.js +++ b/site/src/changelog.js @@ -2,7 +2,25 @@ // Source of truth: repo-root CHANGELOG.md. window.TIHOLE_CHANGELOG = [ { - "ver": "0.1.0", + "ver": "1.0.0-beta.1", + "date": "2026-07-26", + "sections": [ + { + "name": "changed", + "bullets": [ + "Canonicalized the module path to `github.com/z19r/tihole` so `go install github.com/z19r/tihole/cmd/tihole` resolves." + ] + }, + { + "name": "added", + "bullets": [ + "MIT license." + ] + } + ] + }, + { + "ver": "1.0.0", "date": "2026-07-25", "sections": [ { diff --git a/site/src/version.js b/site/src/version.js index 5168b5a..537808c 100644 --- a/site/src/version.js +++ b/site/src/version.js @@ -1,2 +1,2 @@ // Single source of truth — regenerated by `just release`. -window.TIHOLE_VERSION = "0.1.0"; +window.TIHOLE_VERSION = "1.0.0";