Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Commit

Permalink
build: add commit-and-tag-version config
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Sep 7, 2022
1 parent f8d2736 commit 00f5710
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .versionrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const version_updater_regex = {
readVersion: function (contents) {
version_m = contents.match(this.regex);
if (!version_m)
throw new Error("Cannot parse version!");
return version_m[1];
},
writeVersion: function (contents, version) {
new_version = this.regex_repl.replace("$1", version);
return contents.replace(this.regex, new_version);
}
}

let version_updater = {...version_updater_regex};
version_updater.regex = /^ version: \"([^\"]+)\"$/m;
version_updater.regex_repl = " version: \"$1\"";

let bumpFiles = [
{
filename: "Sources/markers-extractor-cli/MarkersExtractorCLI.swift",
updater: version_updater,
}
]

module.exports = {
tagPrefix: "",
header: "",
sign: true,
packageFiles: [],
bumpFiles: bumpFiles
}

0 comments on commit 00f5710

Please sign in to comment.