forked from NationalBankBelgium/stark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(release): set npm tags 'latest' and 'next' correctly after every …
- Loading branch information
1 parent
03cd514
commit 7cca2ab
Showing
7 changed files
with
57 additions
and
10 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
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
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
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,27 @@ | ||
const fs = require("fs"); | ||
|
||
let packageJsonPath = process.argv[2]; | ||
let latestVersion = process.argv[3]; | ||
let isCorrect = true; | ||
|
||
fs.readFile(packageJsonPath, "utf8", function(err, packageJsonData) { | ||
if (err) { | ||
return console.error("Error while reading file => " + err); | ||
} | ||
|
||
const validVersionPattern = new RegExp('\\"nightlyVersion\\": \\"' + latestVersion + '\\"', "gi"); | ||
if (packageJsonData.match(validVersionPattern)) { | ||
isCorrect = false; | ||
console.error("Nightly version of Stark packages is not correct. It should be higher than the latest version: '" + latestVersion + "'"); | ||
} | ||
|
||
if (!isCorrect) { | ||
throw new Error( | ||
"The version set for nightly builds ('config.nightlyVersion') is not correct in " + | ||
packageJsonPath + | ||
". Please adapt to a valid version (higher than '" + | ||
latestVersion + | ||
"')." | ||
); | ||
} | ||
}); |
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
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
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