Skip to content

Commit

Permalink
Change release env var from jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
yershalom committed Nov 5, 2018
1 parent 36c0046 commit 92b80ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const fs = require('fs');
const _ = require('lodash');

// Workaround JS
const release = !!!process.env.RELEASE_BUILD;
const isRelease = process.env.RELEASE_BUILD === 'true';

const ONLY_ON_BRANCH = 'origin/master';
const VERSION_TAG = release ? 'latest' : 'snapshot';
const VERSION_TAG = isRelease ? 'latest' : 'snapshot';
const VERSION_INC = 'patch';

function run() {
Expand Down Expand Up @@ -60,7 +60,7 @@ function versionTagAndPublish() {
const currentPublished = findCurrentPublishedVersion();
console.log(`current published version: ${currentPublished}`);

const version = release ? process.env.VERSION : `${currentPublished}-snapshot.${process.env.BUILD_ID}`;
const version = isRelease ? process.env.VERSION : `${currentPublished}-snapshot.${process.env.BUILD_ID}`;
console.log(`Publishing version: ${version}`);

tryPublishAndTag(version);
Expand Down

0 comments on commit 92b80ef

Please sign in to comment.