5af107b06d
- GitHub release support: internal/ghclient (no SDK, minimal HTTP client); GITHUB_TOKEN env var; github.token/github.repo config; GitHub takes precedence over GitLab when both are configured; publisher interface (releasePublisher) in cmd/main.go makes providers interchangeable - SSH agent push: gitutil.Push() now tries gitssh.NewSSHAgentAuth for git@/ssh:// remotes before falling back to the system git binary - --release-env-file flag: override dotenv artifact path; pass "" to disable - git.releasable_types config: filter which commit types trigger a bump (defaults to fix, feat, breaking); useful for maintenance branches - commits.Group(), ExtractSubject(), ReleasableSet() exported helpers: notes.go and changelog.go now delegate to these instead of duplicating - CHANGELOG deduplication guard: changelog.Update() is idempotent — skips write if ## [version] section already exists - Always load config sources: LoadWithSources() called unconditionally; removes the dual config path that previously only tracked sources in --verbose mode - .releaser.gitlab-ci.yml: adds artifacts: reports: dotenv: release.env Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5.2 KiB
5.2 KiB
Roadmap
v0.1 — Core logic (MVP) ✅
- Branch name parser (
release/X.Y→ major, minor) - Git tag discovery (latest
vX.Y.*tag reachable from HEAD — ancestor check, not global latest) - Conventional Commits parser (non-strict mode: case-insensitive, optional scope, flexible whitespace)
- Commit range walker (last tag → HEAD, or full history on first release)
- Version bump calculator — returns plain
X.Y.Z(prefix kept separate) --dry-runflag: print next version and exit--branchflag: override branch detection (detached HEAD in CI)- Exit code 2 when no releasable commits
v0.2 — Config + Maven + local git ops ✅
.releaser.ymlconfig file (loaded from repo root, merged over defaults, missing file is not an error)- Configurable tag prefix (
tag_prefix: "v"ortag_prefix: ""for no prefix) - Configurable commit message template (
{version}placeholder) - Configurable
pom_path(defaultpom.xml) --pomCLI flag: override pom path--tag-prefixCLI flag: override tag prefixpom.xmlversion reader (ignores<parent>and dependency versions)pom.xmlversion writer (in-place, handles-SNAPSHOT→ release)- Git commit of
pom.xmlchanges (author resolved from git config, overridable in.releaser.yml) - Git tag creation (lightweight, on the release commit)
v0.3 — GitLab integration ✅
- GitLab release creation via API (minimal HTTP client, no external dependency)
- Release notes body auto-generated from commit log (grouped by Breaking Changes / Features / Bug Fixes)
GITLAB_TOKENenv var supportCI_SERVER_URL/CI_PROJECT_ID/CI_PROJECT_PATHenv var support (GitLab CI native)--no-pushflag: commit+tag locally without pushing or creating GitLab release- Git push via HTTPS token auth (
oauth2+GITLAB_TOKEN) - GitLab section in
.releaser.yml:gitlab: url: "https://gitlab.example.com" token: "" # prefer env GITLAB_TOKEN project: "" # prefer env CI_PROJECT_ID
v0.4 — Hardening & CI template ✅
- Configurable branch pattern (
git.branch_patternin.releaser.yml, defaultrelease/X.Y, supports regex e.g.(?:release|hotfix)/X.Y) --branch-patternCLI flag to override- Dirty working tree check — aborts if tracked files are modified or staged (untracked files ignored)
--no-commitflag: update pom.xml then stop — commit manually and re-run with--tag-only--tag-onlyflag: skip pom.xml update, tag HEAD and pushDockerfile— multi-stage build, alpine final image withca-certificates.releaser.gitlab-ci.yml— reusable CI job template withGIT_DEPTH: 0and HTTPS push setup.releaser.ymltemplate — annotated example of every config option with defaults- Taskfile —
build,run,test,cov,cov:text,lint,fmt,tidy,fuzz,fuzz:all,ci,clean,docker:build,docker:run - Gitea CI workflow (vet, staticcheck, test, build)
- Gitea release workflow (5-platform cross-compilation, release asset upload)
- 96% test coverage with real in-memory git repos and fuzz tests for all parsers
v0.5 — Changelog ✅
CHANGELOG.mdgeneration / append (grouped by commit type: Breaking Changes / Added / Fixed)--changelog-fileflag to use a custom filename--initflag to scaffold a default.releaser.yml- Push falls back to system
gitCLI when no token is set (uses credential helpers, SSH, netrc)
v1.0 — Production ready
Integration tests against a real Git repo (with fixture commits and tags)— ✓ shipped v0.4.0 (96% coverage, real in-memory repos)Cross-compilation in CI (linux/amd64, linux/arm64, darwin/amd64)— ✓ shipped v0.4.0 (Gitea release workflow, + darwin/arm64 + windows/amd64)— ✓ shipped v1.2.0 (shows config sources, commit analysis, version decision)--verboseflagColored, structured CLI output— ✓ shipped v1.2.0 (·/✓/!symbols,▸section headers in verbose, TTY-aware ANSI colors)Name and version header on every run— ✓ shipped v1.2.0Default tag prefix changed to empty— ✓ shipped v1.2.0 (bare1.2.3tags by default; opt in tovprefix via config)— ✓ shipped v1.3.0 (release.envdotenv artifactNEXT_VERSION=<tag>written on every release for GitLab CI downstream jobs)GitHub release support— ✓ shipped v1.4.0 (internal/ghclient,GITHUB_TOKENenv,github.token/github.repoconfig; GitHub takes precedence over GitLab)SSH agent push— ✓ shipped v1.4.0 (go-gitgitssh.NewSSHAgentAuthforgit@/ssh://remotes)Configurable bump rules— ✓ shipped v1.4.0 (git.releasable_typesconfig; filter which commit types trigger a release)- Documentation site
Future / backlog
- Multi-module Maven support (multiple
pom.xmlpaths) - Gradle support (
build.gradle/build.gradle.kts) package.jsonversion bump support (Node.js projects)- Slack / Teams notification on release
- Configurable bump rules (e.g. treat
feat:as minor onmainbranch)