Skip to content

Commit 7997e56

Browse files
committed
bump-version.js --auto: do replace the values
Git for Windows v2.49.0 was the first chance for this new code to be exercised after switching to a Hugo-generated site. And sure enough, there were bugs ;-) Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b0b311a commit 7997e56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bump-version.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ var updateVersion = (version, tag, timestamp, url) => {
1717
if (err)
1818
die(err);
1919
data = data
20-
.replace(/^( version: ).*/, `$1${version}`)
21-
.replace(/^( tag_name: ).*/, `$1${tag}`)
22-
.replace(/^( publish_date: ).*/, `$1"${timestamp}"`)
23-
.replace(/^( url: ).*/, `$1"${url}"`);
20+
.replace(/(\n version: ).*/, `$1${version}`)
21+
.replace(/(\n tag_name: ).*/, `$1${tag}`)
22+
.replace(/(\n publish_date: ).*/, `$1"${timestamp}"`)
23+
.replace(/(\n url: ).*/, `$1"${url}"`);
2424
fs.writeFileSync('hugo.yml', data);
2525
});
2626
};

0 commit comments

Comments
 (0)