8a5aae3de9
ci / vet, staticcheck, test, build (push) Successful in 3m32s
- Add releaser-logo-1024.png as Geekdoc site header logo (geekdocLogo) and a 128×128 resized copy in README - Set docs/hugo.toml baseURL to https://releaser.k3nny.fr/ - Anchor .gitignore binary pattern to /releaser-* to stop it matching files inside docs/static/images/ - Restore docs URL link in README lost during merge to main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 KiB
13 KiB
Changelog
All notable changes to this project will be documented in this file. Format: Keep a Changelog.
[1.6.3] - 2026-07-11
Added
- Logo —
docs/static/images/releaser-logo-1024.png(1024×1024) set as Geekdoc site header logo viageekdocLogo; 128×128 version added to README above the release badge
Fixed
.gitignoreover-matching —releaser-*was catching files insidedocs/static/images/; anchored to/releaser-*so only root-level release binaries are excluded
Changed
docs/hugo.tomlbaseURL— set tohttps://releaser.k3nny.fr/(was"/")
[1.6.2] - 2026-07-11
Changed
task cinow runsgo tool staticcheck ./...— runs betweengo vetandgo test; matches the step already present in the Gitea CI workflow
Fixed
- SA4006 in
TestLatestTagTagsIterFails—errfromgogit.PlainOpenwas assigned then immediately overwritten without being read; added the missingif err != nil { t.Fatalf(...) }check
[1.6.1] - 2026-07-11
Fixed
- CI root-permission failures — four tests that used
os.Chmodto force error paths were failing in Docker CI (which runs as root, where chmod has no enforcement effect); each now skips withos.Getuid() == 0; the gitutil test had broken skip logic that only fired ifChmoditself errored — replaced with the same upfront UID check
[1.6.0] - 2026-07-11
Added
- Gradle support — new
internal/gradlepackage; reads and writes the version assignment inbuild.gradle(Groovy DSL, single-quoted) andbuild.gradle.kts(Kotlin DSL, double-quoted); original quote style preserved on write;regexp.QuoteMetaensures version strings with dots or special chars are safe gradle.build_file/gradle.build_filesconfig — opt-in, no default;build_fileslist overridesbuild_filefor multi-module projects; follows the same multi-value pattern asmaven.pom_pathsandnode.package_jsons--gradle <path>flag — overridesgradle.build_filefrom config and clearsgradle.build_files; mirrored in verbose config table asgradle.pathsFuzzReadVersion/FuzzWriteVersionininternal/gradle— 100% per-package statement coverage maintained across all 13 packages
[1.5.1] - 2026-07-11
Added
- Documentation site — Hugo + Geekdoc theme; content covers installation, CLI reference, configuration, CI integration, and changelog; deployed to
gh-pagesvia Gitea CI on push tomain docs:setup/docs:serve/docs:buildTaskfile tasks —docs:setupdownloads the Geekdoc theme bundle (idempotent);docs:serveruns Hugo with live reload;docs:buildproduces a minified static siteFuzzUpdateininternal/changelog— fuzzes arbitrary existing file content paired with a commit message, covering the\n## [insertion logic and idempotency guardFuzzWriteVersionininternal/node— mirrorsFuzzReplaceProjectVersionininternal/maven; fuzzes arbitrary JSON content with arbitrary old/new version strings
Changed
- CLAUDE.md — new "Fuzzing" section: authoritative table of which packages require fuzz tests and why, list of exempt packages with rationale, seed corpus guidelines
[1.5.0] - 2026-07-11
Added
- Multi-module Maven support —
maven.pom_paths: [...]lists multiplepom.xmlpaths (e.g. root + sub-modules); overridespom_path; each path is updated and committed in the same release commit - Node.js
package.jsonsupport — opt-in vianode.package_json(single path) ornode.package_jsons(list, overrides the single path); version is bumped in-place alongsidepom.xmlandCHANGELOG.md git.bump_rulesconfig — controls which version component each commit type bumps:breaking,feat,fixeach accept"patch"(default) or"minor"; allows e.g.feat: "minor"to bump the minor component instead of patch- Injectable function vars in
cmd/main.go—absPath,gitAllCommits,gitCommitsSince,gitCommitFilesare now package-level vars overridable in tests to inject errors, enabling 100% per-package statement coverage across all 12 packages
Changed
--pomflag now clearsmaven.pom_pathsbefore settingmaven.pom_path, ensuring the CLI flag always wins over a multi-path config file entryversion.Next()signature — accepts amap[commits.Type]semver.BumpLevelbump-rules map as a sixth parameter;nildefaults to all-patch (no change to existing behaviour)- Verbose config table — now includes
git.bump_rules.breaking/feat/fix,maven.pom_paths(effective list), andnode.pathsrows
[1.4.0] - 2026-07-11
Added
- GitHub release support — new
internal/ghclientpackage (minimal HTTP client, no SDK); configured viagithub.token+github.repoin.releaser.ymlorGITHUB_TOKENenv var; GitHub takes precedence over GitLab when both are configured - SSH agent push —
gitutil.Push()now attempts go-git SSH agent auth (gitssh.NewSSHAgentAuth) forgit@/ssh://remotes before falling back to the systemgitbinary; no extra configuration needed --release-env-fileflag — override the dotenv artifact path (relative to repo root; defaultrelease.env); pass""to disable writing the file entirely (e.g. for local runs)git.releasable_typesconfig — opt-in list of commit types that count as releasable (fix,feat,breaking); defaults to all three; useful for maintenance branches where some types should not trigger a releasecommits.Group(),ExtractSubject(),ReleasableSet()— exported helpers ininternal/commits; shared bynotesandchangelog, eliminating duplicated grouping and subject-extraction logic- CHANGELOG deduplication guard —
changelog.Update()is now idempotent; skips the write if a## [version]section already exists, preventing duplicate entries on CI reruns - Publisher interface —
releasePublisherinterface +buildPublisher()incmd/main.go; GitLab and GitHub are now interchangeable backends; new providers can be added without touching the orchestration logic artifacts: reports: dotenv: release.envin.releaser.gitlab-ci.yml— exposesNEXT_VERSIONto downstream GitLab CI jobs out of the box
Changed
- Always load config sources —
LoadWithSources()is now called unconditionally instead of only in--verbosemode; single code path, no behavioural difference version.Next()signature — accepts amap[commits.Type]boolreleasable set as a fifth parameter;nildefaults to all three types (no change to existing behaviour)- Verbose config table — now includes
git.releasable_types,github.token, andgithub.reporows
[1.3.0] - 2026-07-07
Added
release.envdotenv artifact — on every real release (not--dry-run) arelease.envfile is written to the repository root containingNEXT_VERSION=<tag>; the file is never committed, allowing GitLab CI to expose it as a dotenv artifact and pass the version to downstream jobs (deploy, notify, etc.)
[1.2.0] - 2026-07-07
Added
--verboseflag — prints a configuration table (each key, its value, and source:default/config file/env: VARNAME/flag: --name), lists every commit since the last tag with its parsed type and bump decision, and shows the final version choice; all output goes to stderr- Colored, structured CLI output — progress lines use
·/✓/!prefix symbols;--verbosemode uses▸section headers (configuration / branch / commits / version); commit type column colored by kind (cyan=feat, green=fix, red=breaking); config source tags colored; respectsNO_COLORandTERM=dumb; auto-disabled when stderr is not a TTY - Name and version header —
releaser vX.Y.Zprinted to stderr at the start of every invocation
Changed
- Default
tag_prefixis now empty — tags are bare version numbers (1.2.3) by default; addtag_prefix: "v"to.releaser.ymlor pass--tag-prefix vto opt in to thev-prefixed convention
[1.1.0] - 2026-07-07
Added
- CHANGELOG.md auto-update — every release now writes a new dated section to
CHANGELOG.md(grouped by Breaking Changes / Added / Fixed), committed alongsidepom.xmlin the release commit; file is created if it does not exist --changelog-fileflag — override the defaultCHANGELOG.mdpath (e.g.--changelog-file CHANGES.md)--initflag — scaffolds a fully-commented default.releaser.ymlin the repository root; errors if the file already existsCommitFilesingitutil— internal helper that stages multiple files before a single commit, used to bundlepom.xml+CHANGELOG.mdin one release commit
Fixed
- Push without token — go-git's HTTPS transport does not use the system credential store; when
GITLAB_TOKENis unset the push now delegates to thegitCLI so credential helpers, SSH agents, andnetrcall work as expected
[0.4.2] - 2026-07-07
Fixed
- CI build step —
go build ./cmd/...failed with "output already exists and is a directory" because Go tried to write a binary namedcmd, conflicting with the source directory; fixed by passing-o /dev/null - Optional pom.xml — releaser no longer fails when
pom.xml(or the configuredmaven.pom_path) does not exist; it logs a notice and proceeds directly to tag and push, making the tool usable in non-Maven projects
[0.4.0] - 2026-07-07
Added
- Branch parser — extracts
major.minorfromrelease/X.Ybranch names using a configurable regex pattern - Git tag discovery — finds the latest
vX.Y.*tag that is a reachable ancestor of HEAD (ignores tags on other version lines or unrelated branches) - Conventional Commits parser — non-strict mode: case-insensitive type, optional scope, flexible whitespace; unrecognised messages are silently skipped
- Commit range walker — scans from last matching tag to HEAD; falls back to full history on first release in a branch
- Version calculator — increments patch; returns nothing when there are no releasable commits (exit code 2 so CI can distinguish "nothing to do" from errors)
--dry-runflag — prints next version without making any changes--branchflag — overrides automatic branch detection for detached-HEAD CI environments--no-pushflag — commits and tags locally without pushing or creating a GitLab release--no-commitflag — updatespom.xmland stops; re-run with--tag-onlyafter manual review--tag-onlyflag — tags HEAD without touchingpom.xml(pair with--no-commitflow)- Dirty working-tree check — aborts before any changes if tracked files are modified or staged
.releaser.ymlconfig — optional YAML loaded from repo root; missing file is not an error; all fields have sensible defaults- Configurable tag prefix —
git.tag_prefixin config or--tag-prefixflag (default:v) - Configurable branch pattern —
git.branch_patternin config or--branch-patternflag (default:^(?:.*/)?release/(\d+)\.(\d+)$) - Configurable commit message —
git.commit_messagewith{version}placeholder (default:chore(release): {version} [skip ci]) - Configurable commit author —
git.author_name/git.author_email; falls back to repo git config - Configurable
pom_path—maven.pom_pathin config or--pomflag (default:pom.xml) pom.xmlreader / writer — in-place version update; correctly ignores<parent>and dependency version elements- GitLab release creation — minimal HTTP client (no SDK); auto-generates release notes grouped by Breaking Changes / Features / Bug Fixes
- HTTPS push with token auth —
oauth2+GITLAB_TOKEN GITLAB_TOKEN,CI_SERVER_URL,CI_PROJECT_ID,CI_PROJECT_PATHenv var support for GitLab CI environmentsDockerfile— multi-stage build, Alpine final image withca-certificates.releaser.gitlab-ci.yml— reusable GitLab CI job template (extends: .releaser:release) withGIT_DEPTH: 0and HTTPS push pre-wired.releaser.ymltemplate — annotated example of every config option with its default value- Gitea CI workflow — runs
vet,staticcheck,test,buildon every push - Gitea release workflow — cross-compiles five platform binaries (linux/amd64+arm64, darwin/amd64+arm64, windows/amd64) and publishes them as release assets on tag push
- Taskfile —
build,run,test,cov,cov:text,lint,fmt,tidy,fuzz,fuzz:all,ci,clean,docker:build,docker:run - 96% test coverage — integration tests use real in-memory git repositories; fuzz tests cover all parser entry-points