Bladeren bron

JS workaround for release script

Shalom Yerushalmy 6 jaren geleden
bovenliggende
commit
78be1d61ef
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5
    5
      scripts/release.js

+ 5
- 5
scripts/release.js Bestand weergeven

4
 const fs = require('fs');
4
 const fs = require('fs');
5
 const _ = require('lodash');
5
 const _ = require('lodash');
6
 
6
 
7
-const ONLY_ON_BRANCH = 'origin/master';
8
-const VERSION_TAG = process.env.RELEASE_BUILD ? 'latest' : 'snapshot';
9
-const VERSION_INC = 'patch';
10
-
11
 // Workaround JS
7
 // Workaround JS
12
 const release = !!!process.env.RELEASE_BUILD;
8
 const release = !!!process.env.RELEASE_BUILD;
13
 
9
 
10
+const ONLY_ON_BRANCH = 'origin/master';
11
+const VERSION_TAG = release ? 'latest' : 'snapshot';
12
+const VERSION_INC = 'patch';
13
+
14
 function run() {
14
 function run() {
15
   if (!validateEnv()) {
15
   if (!validateEnv()) {
16
     return;
16
     return;
44
   exec.execSyncSilent(`git config --global user.name "${process.env.GIT_USER}"`);
44
   exec.execSyncSilent(`git config --global user.name "${process.env.GIT_USER}"`);
45
   const remoteUrl = new RegExp(`https?://(\\S+)`).exec(exec.execSyncRead(`git remote -v`))[1];
45
   const remoteUrl = new RegExp(`https?://(\\S+)`).exec(exec.execSyncRead(`git remote -v`))[1];
46
   exec.execSyncSilent(`git remote add deploy "https://${process.env.GIT_USER}:${process.env.GIT_TOKEN}@${remoteUrl}"`);
46
   exec.execSyncSilent(`git remote add deploy "https://${process.env.GIT_USER}:${process.env.GIT_TOKEN}@${remoteUrl}"`);
47
-  exec.execSync(`git checkout ${ONLY_ON_BRANCH}`);
47
+  // exec.execSync(`git checkout ${ONLY_ON_BRANCH}`);
48
 }
48
 }
49
 
49
 
50
 function createNpmRc() {
50
 function createNpmRc() {