Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@ flutree version

Single source of truth policy:

- `VERSION` in the repository root is the only canonical release version.
- Release Please is the canonical source for release versioning.
- `VERSION` is auto-managed by the release PR and mirrors release-please version output.
- Packaging injects this value into CLI output (`flutree --version`).
- Release gate enforces `tag == VERSION == flutree --version`.
- Release Please is the default tag generation flow on merges to `main`.
- `.release-please-manifest.json` and `VERSION` are expected to stay aligned.

Brew-only update flow:

Expand Down
6 changes: 6 additions & 0 deletions docs/release-brew.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Optional env vars:
- validates `VERSION` uses strict `X.Y.Z` semver;
- validates optional release tag and CLI version against `VERSION`.

Release version source of truth:
- Release Please drives the version bump.
- `VERSION` is auto-managed by the Release Please PR (`release-please-config.json` with `version-file: VERSION`).
- `.release-please-manifest.json` and `VERSION` must remain synchronized.

`scripts/verify_macos_binary.sh`:
- smoke-checks `flutree --help`;
- validates `flutree --version` when `--expected-version` is provided.
Expand Down Expand Up @@ -55,6 +60,7 @@ Formula URL/checksum naming contract:
## Maintainer checklist

1. Merge the Release Please PR generated by `.github/workflows/release-please.yml`.
- The PR must include synchronized updates for both `.release-please-manifest.json` and `VERSION`.
2. Ensure repository secret `HOMEBREW_TAP_TOKEN` is set in `EndersonPro/flutree` with push access to `EndersonPro/homebrew-flutree`.
3. Wait for `.github/workflows/release-please.yml` to complete both jobs:
- `release-please` (creates/updates release and exposes outputs)
Expand Down
31 changes: 31 additions & 0 deletions integration/release_contract_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package integration_test

import (
"encoding/json"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -113,6 +114,36 @@ func TestVersionContractScriptsAndReleasePleaseConfigExist(t *testing.T) {
t.Fatalf("required file missing: %s (%v)", file, err)
}
}

configPath := filepath.Join(root, "release-please-config.json")
configContent, err := os.ReadFile(configPath)
if err != nil {
t.Fatal(err)
}

var config struct {
Packages map[string]struct {
ReleaseType string `json:"release-type"`
VersionFile string `json:"version-file"`
} `json:"packages"`
}

if err := json.Unmarshal(configContent, &config); err != nil {
t.Fatalf("invalid release-please config: %v", err)
}

rootPackage, ok := config.Packages["."]
if !ok {
t.Fatalf("release-please config missing root package entry")
}

if rootPackage.ReleaseType != "simple" {
t.Fatalf("expected root release-type=simple, got %q", rootPackage.ReleaseType)
}

if rootPackage.VersionFile != "VERSION" {
t.Fatalf("expected root version-file=VERSION, got %q", rootPackage.VersionFile)
}
}

func TestVersionContractJobRunsInPRWorkflow(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "go",
"release-type": "simple",
"version-file": "VERSION",
"include-v-in-tag": true,
"changelog-path": "CHANGELOG.md"
}
Expand Down
Loading