Fix tag validation
Andrew Clark committed
Jun 8, 2021 at 11:53 UTC
e6be2d531d82be6a601abbd392e4615f90e1f87a
1 file changed
+2
-2
scripts/release/publish-commands/validate-tags.js
+2
-2
@@ -19,7 +19,7 @@ const run = async ({cwd, packages, tags}) => {
19
);
20
const {version} = await readJson(packageJSONPath);
21
const isExperimentalVersion = version.indexOf('experimental') !== -1;
22
- if (version.indexOf('-') === 0) {
22
+ if (version.indexOf('-') !== -1) {
23
if (tags.includes('latest')) {
24
if (isExperimentalVersion) {
25
console.log(
@@ -45,7 +45,7 @@ const run = async ({cwd, packages, tags}) => {
45
process.exit(1);
46
}
47
} else {
48
- if (version.indexOf('-') === -1 && !tags.includes('latest')) {
48
+ if (!tags.includes('latest')) {
49
console.log(
50
theme`{error Stable release} {version ${version}} {error must always be tagged as} {tag latest}`
51
);