Skip to content

Commit

Permalink
fix replacement issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgoetz committed Oct 26, 2024
1 parent 1a3150c commit 98b8cb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/versionbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ func (vb *VersionBump) bumpPreflight() {
// log what changes will be made to each file
for _, file := range vb.Config.Files {
for _, replace := range file.Replace {
find := vbu.ReplaceInString(replace, "{Version}", vb.GetOldVersion())
replace := vbu.ReplaceInString(replace, "{Version}", vb.GetNewVersion())
find := vbu.ReplaceInString(replace, "{version}", vb.GetOldVersion())
replace := vbu.ReplaceInString(replace, "{version}", vb.GetNewVersion())

logVerbose(vb.Options, file.Path)
logVerbose(vb.Options, fmt.Sprintf(" Find: \"%s\"", find))
Expand Down
2 changes: 1 addition & 1 deletion versionbump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git-sign: true # Whether to sign the git tag.
files: # The files to update with the new version.
- path: "internal/versionbump.go" # The path to the file to update.
replace:
- "const Version = \"{version}\"" # The search string to replace in the file.
- "\"{version}\"" # The search string to replace in the file.

- path: "README.md"
replace:
Expand Down

0 comments on commit 98b8cb8

Please sign in to comment.