Browse Source

Change release env var from jenkins

Shalom Yerushalmy 6 years ago
parent
commit
92b80efad3
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      scripts/release.js

+ 3
- 3
scripts/release.js View File

5
 const _ = require('lodash');
5
 const _ = require('lodash');
6
 
6
 
7
 // Workaround JS
7
 // Workaround JS
8
-const release = !!!process.env.RELEASE_BUILD;
8
+const isRelease = process.env.RELEASE_BUILD === 'true';
9
 
9
 
10
 const ONLY_ON_BRANCH = 'origin/master';
10
 const ONLY_ON_BRANCH = 'origin/master';
11
-const VERSION_TAG = release ? 'latest' : 'snapshot';
11
+const VERSION_TAG = isRelease ? 'latest' : 'snapshot';
12
 const VERSION_INC = 'patch';
12
 const VERSION_INC = 'patch';
13
 
13
 
14
 function run() {
14
 function run() {
60
   const currentPublished = findCurrentPublishedVersion();
60
   const currentPublished = findCurrentPublishedVersion();
61
   console.log(`current published version: ${currentPublished}`);
61
   console.log(`current published version: ${currentPublished}`);
62
 
62
 
63
-  const version = release ? process.env.VERSION : `${currentPublished}-snapshot.${process.env.BUILD_ID}`;
63
+  const version = isRelease ? process.env.VERSION : `${currentPublished}-snapshot.${process.env.BUILD_ID}`;
64
   console.log(`Publishing version: ${version}`);
64
   console.log(`Publishing version: ${version}`);
65
 
65
 
66
   tryPublishAndTag(version);
66
   tryPublishAndTag(version);