Daniel Zlotin před 7 roky
rodič
revize
a342dbd64d
2 změnil soubory, kde provedl 41 přidání a 14 odebrání
  1. 4
    2
      scripts/release.js
  2. 37
    12
      yarn.lock

+ 4
- 2
scripts/release.js Zobrazit soubor

@@ -77,10 +77,11 @@ function tryPublishAndTag(version) {
77 77
       console.log(`Released ${theCandidate}`);
78 78
       return;
79 79
     } catch (e) {
80
-      const alreadyPublished = _.includes(e.message, 'You cannot publish over the previously published version');
80
+      const alreadyPublished = _.includes(e.toString(), 'You cannot publish over the previously published version');
81 81
       if (!alreadyPublished) {
82 82
         throw e;
83 83
       }
84
+      console.log(`previously published. retrying with increased ${VERSION_INC}...`);
84 85
       retry++;
85 86
       theCandidate = semver.inc(theCandidate, VERSION_INC);
86 87
     }
@@ -88,8 +89,9 @@ function tryPublishAndTag(version) {
88 89
 }
89 90
 
90 91
 function tagAndPublish(newVersion) {
92
+  console.log(`trying to publish ${newVersion}...`);
91 93
   exec.execSync(`npm --no-git-tag-version version ${newVersion}`);
92
-  exec.execSync(`npm publish --tag ${VERSION_TAG}`);
94
+  exec.execSyncRead(`npm publish --tag ${VERSION_TAG}`);
93 95
   exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
94 96
   exec.execSyncSilent(`git push deploy ${newVersion} || true`);
95 97
 }

+ 37
- 12
yarn.lock Zobrazit soubor

@@ -105,10 +105,10 @@ ansi-styles@^2.2.1:
105 105
   resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
106 106
 
107 107
 ansi-styles@^3.0.0, ansi-styles@^3.1.0:
108
-  version "3.1.0"
109
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750"
108
+  version "3.2.0"
109
+  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
110 110
   dependencies:
111
-    color-convert "^1.0.0"
111
+    color-convert "^1.9.0"
112 112
 
113 113
 ansi@^0.3.0, ansi@~0.3.1:
114 114
   version "0.3.1"
@@ -953,8 +953,8 @@ big-integer@^1.6.7:
953 953
   resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.23.tgz#e85d508220c74e3f43a4ce72eed51f3da4db94d1"
954 954
 
955 955
 binary-extensions@^1.0.0:
956
-  version "1.8.0"
957
-  resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"
956
+  version "1.9.0"
957
+  resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.9.0.tgz#66506c16ce6f4d6928a5b3cd6a33ca41e941e37b"
958 958
 
959 959
 block-stream@*:
960 960
   version "0.0.9"
@@ -1180,7 +1180,7 @@ code-point-at@^1.0.0:
1180 1180
   version "1.1.0"
1181 1181
   resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
1182 1182
 
1183
-color-convert@^1.0.0:
1183
+color-convert@^1.9.0:
1184 1184
   version "1.9.0"
1185 1185
   resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
1186 1186
   dependencies:
@@ -1341,6 +1341,14 @@ cross-spawn@^4.0.2:
1341 1341
     lru-cache "^4.0.1"
1342 1342
     which "^1.2.9"
1343 1343
 
1344
+cross-spawn@^5.1.0:
1345
+  version "5.1.0"
1346
+  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
1347
+  dependencies:
1348
+    lru-cache "^4.0.1"
1349
+    shebang-command "^1.2.0"
1350
+    which "^1.2.9"
1351
+
1344 1352
 cryptiles@2.x.x:
1345 1353
   version "2.0.5"
1346 1354
   resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -1590,13 +1598,14 @@ eslint-scope@^3.7.1:
1590 1598
     estraverse "^4.1.1"
1591 1599
 
1592 1600
 eslint@4.x.x:
1593
-  version "4.2.0"
1594
-  resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.2.0.tgz#a2b3184111b198e02e9c7f3cca625a5e01c56b3d"
1601
+  version "4.3.0"
1602
+  resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.3.0.tgz#fcd7c96376bbf34c85ee67ed0012a299642b108f"
1595 1603
   dependencies:
1596 1604
     ajv "^5.2.0"
1597 1605
     babel-code-frame "^6.22.0"
1598 1606
     chalk "^1.1.3"
1599 1607
     concat-stream "^1.6.0"
1608
+    cross-spawn "^5.1.0"
1600 1609
     debug "^2.6.8"
1601 1610
     doctrine "^2.0.0"
1602 1611
     eslint-scope "^3.7.1"
@@ -1605,6 +1614,7 @@ eslint@4.x.x:
1605 1614
     estraverse "^4.2.0"
1606 1615
     esutils "^2.0.2"
1607 1616
     file-entry-cache "^2.0.0"
1617
+    functional-red-black-tree "^1.0.1"
1608 1618
     glob "^7.1.2"
1609 1619
     globals "^9.17.0"
1610 1620
     ignore "^3.3.3"
@@ -1623,6 +1633,7 @@ eslint@4.x.x:
1623 1633
     pluralize "^4.0.0"
1624 1634
     progress "^2.0.0"
1625 1635
     require-uncached "^1.0.3"
1636
+    semver "^5.3.0"
1626 1637
     strip-json-comments "~2.0.1"
1627 1638
     table "^4.0.1"
1628 1639
     text-table "~0.2.0"
@@ -1935,6 +1946,10 @@ function-bind@^1.0.2:
1935 1946
   version "1.1.0"
1936 1947
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
1937 1948
 
1949
+functional-red-black-tree@^1.0.1:
1950
+  version "1.0.1"
1951
+  resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
1952
+
1938 1953
 gauge@~1.2.5:
1939 1954
   version "1.2.7"
1940 1955
   resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93"
@@ -4129,6 +4144,16 @@ setimmediate@^1.0.5:
4129 4144
   version "1.0.5"
4130 4145
   resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
4131 4146
 
4147
+shebang-command@^1.2.0:
4148
+  version "1.2.0"
4149
+  resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
4150
+  dependencies:
4151
+    shebang-regex "^1.0.0"
4152
+
4153
+shebang-regex@^1.0.0:
4154
+  version "1.0.0"
4155
+  resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
4156
+
4132 4157
 shell-quote@1.6.1, shell-quote@^1.6.1:
4133 4158
   version "1.6.1"
4134 4159
   resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
@@ -4139,8 +4164,8 @@ shell-quote@1.6.1, shell-quote@^1.6.1:
4139 4164
     jsonify "~0.0.0"
4140 4165
 
4141 4166
 shell-utils@1.x.x:
4142
-  version "1.0.7"
4143
-  resolved "https://registry.yarnpkg.com/shell-utils/-/shell-utils-1.0.7.tgz#0286eeb6ff6db6c31b05c35b930b6cf531fa8ce2"
4167
+  version "1.0.8"
4168
+  resolved "https://registry.yarnpkg.com/shell-utils/-/shell-utils-1.0.8.tgz#4963ce8c4000e1fc19196669ff0d0650991b41ca"
4144 4169
   dependencies:
4145 4170
     lodash "4.x.x"
4146 4171
 
@@ -4336,8 +4361,8 @@ supports-color@^3.1.2:
4336 4361
     has-flag "^1.0.0"
4337 4362
 
4338 4363
 supports-color@^4.0.0:
4339
-  version "4.2.0"
4340
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.0.tgz#ad986dc7eb2315d009b4d77c8169c2231a684037"
4364
+  version "4.2.1"
4365
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836"
4341 4366
   dependencies:
4342 4367
     has-flag "^2.0.0"
4343 4368