-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
Updating the changelog file acts as the point of "this is a now a new version" but many projects have version fields in other places that should update at the same time. Some examples are package.json for javascript, setup.py for python packages, sphinx packages have a version value, etc. Goreleaser allows using ldflags as build parameters which can be injected from changie latest.
Configuration:
replacements:
- path: file/path.ext
find: ' "version": ".*",' # regex search each line in file
replace: ' "version": "{{.VersionNoPrefix}}",' # go template line replacementFor a javascript package.json:
{
"name": "test-project",
"version": "1.0.0",
"description": "changie project",
"main": "src/main.js",
}Replace Struct:
type ReplaceData struct {
Version string // original version
VersionNoPrefix string // no v prefix if version had it
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels