This repository has been archived by the owner on Sep 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add commit-and-tag-version config
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |