Zum Inhalt springen

Plugin: updater-go

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Updates a Go source file that exposes the project version. It is typically used to keep a version.go constant in sync with the SemRel release version.

Terminal window
go install github.com/SemRels/updater-go@latest

Each plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.

version: 1
plugins:
- name: updater-go
path: updater-go
args:
file: version.go
variable: Version
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnoversion.goGo source file to update.
SEMREL_PLUGIN_VARIABLEnoVersionVariable or constant name that holds the version string.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change const Version = "1.3.2" to const Version = "1.4.0".