瀏覽代碼

JS workaround for release script

Shalom Yerushalmy 6 年之前
父節點
當前提交
78be1d61ef
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. 5
    5
      scripts/release.js

+ 5
- 5
scripts/release.js 查看文件

@@ -4,13 +4,13 @@ const semver = require('semver');
4 4
 const fs = require('fs');
5 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 7
 // Workaround JS
12 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 14
 function run() {
15 15
   if (!validateEnv()) {
16 16
     return;
@@ -44,7 +44,7 @@ function setupGit() {
44 44
   exec.execSyncSilent(`git config --global user.name "${process.env.GIT_USER}"`);
45 45
   const remoteUrl = new RegExp(`https?://(\\S+)`).exec(exec.execSyncRead(`git remote -v`))[1];
46 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 50
 function createNpmRc() {