Skip to content

Commit 1ac3127

Browse files
committed
uncomment publish
1 parent 0a918e4 commit 1ac3127

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/release.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ const exec = require('shell-utils').exec;
66
const cp = require('child_process');
77

88
let IS_SNAPSHOT;
9-
const isRelease = process.env.BUILDKITE_MESSAGE.match(/^release$/i);
10-
if (isRelease){
9+
if (process.env.BUILDKITE_MESSAGE.match(/^release$/i)){
1110
IS_SNAPSHOT = cp.execSync(`buildkite-agent meta-data get is-snapshot`).toString();
1211
}
1312
const ONLY_ON_BRANCH = 'origin/release';
@@ -31,7 +30,7 @@ function validateEnv() {
3130
}
3231

3332
if (process.env.BUILDKITE_BRANCH !== ONLY_ON_BRANCH && !isSnapshotBuild) {
34-
console.log(`not publishing on branch ${process.env.GIT_BRANCH}`);
33+
console.log(`not publishing on branch ${process.env.BUILDKITE_BRANCH}`);
3534
return false;
3635
}
3736

@@ -98,7 +97,7 @@ function tryPublishAndTag(version) {
9897
function tagAndPublish(newVersion) {
9998
console.log(`trying to publish ${newVersion}...`);
10099
exec.execSync(`npm --no-git-tag-version --allow-same-version version ${newVersion}`);
101-
// exec.execSyncRead(`npm publish --tag ${VERSION_TAG}`);
100+
exec.execSyncRead(`npm publish --tag ${VERSION_TAG}`);
102101
exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
103102
exec.execSyncSilent(`git push deploy ${newVersion} || true`);
104103
}

0 commit comments

Comments
 (0)