Parcourir la source

fixed releases

Daniel Zlotin il y a 7 ans
Parent
révision
a342dbd64d
2 fichiers modifiés avec 41 ajouts et 14 suppressions
  1. 4
    2
      scripts/release.js
  2. 37
    12
      yarn.lock

+ 4
- 2
scripts/release.js Voir le fichier

77
       console.log(`Released ${theCandidate}`);
77
       console.log(`Released ${theCandidate}`);
78
       return;
78
       return;
79
     } catch (e) {
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
       if (!alreadyPublished) {
81
       if (!alreadyPublished) {
82
         throw e;
82
         throw e;
83
       }
83
       }
84
+      console.log(`previously published. retrying with increased ${VERSION_INC}...`);
84
       retry++;
85
       retry++;
85
       theCandidate = semver.inc(theCandidate, VERSION_INC);
86
       theCandidate = semver.inc(theCandidate, VERSION_INC);
86
     }
87
     }
88
 }
89
 }
89
 
90
 
90
 function tagAndPublish(newVersion) {
91
 function tagAndPublish(newVersion) {
92
+  console.log(`trying to publish ${newVersion}...`);
91
   exec.execSync(`npm --no-git-tag-version version ${newVersion}`);
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
   exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
95
   exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
94
   exec.execSyncSilent(`git push deploy ${newVersion} || true`);
96
   exec.execSyncSilent(`git push deploy ${newVersion} || true`);
95
 }
97
 }

+ 37
- 12
yarn.lock Voir le fichier

105
   resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
105
   resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
106
 
106
 
107
 ansi-styles@^3.0.0, ansi-styles@^3.1.0:
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
   dependencies:
110
   dependencies:
111
-    color-convert "^1.0.0"
111
+    color-convert "^1.9.0"
112
 
112
 
113
 ansi@^0.3.0, ansi@~0.3.1:
113
 ansi@^0.3.0, ansi@~0.3.1:
114
   version "0.3.1"
114
   version "0.3.1"
953
   resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.23.tgz#e85d508220c74e3f43a4ce72eed51f3da4db94d1"
953
   resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.23.tgz#e85d508220c74e3f43a4ce72eed51f3da4db94d1"
954
 
954
 
955
 binary-extensions@^1.0.0:
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
 block-stream@*:
959
 block-stream@*:
960
   version "0.0.9"
960
   version "0.0.9"
1180
   version "1.1.0"
1180
   version "1.1.0"
1181
   resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
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
   version "1.9.0"
1184
   version "1.9.0"
1185
   resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
1185
   resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
1186
   dependencies:
1186
   dependencies:
1341
     lru-cache "^4.0.1"
1341
     lru-cache "^4.0.1"
1342
     which "^1.2.9"
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
 cryptiles@2.x.x:
1352
 cryptiles@2.x.x:
1345
   version "2.0.5"
1353
   version "2.0.5"
1346
   resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
1354
   resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
1590
     estraverse "^4.1.1"
1598
     estraverse "^4.1.1"
1591
 
1599
 
1592
 eslint@4.x.x:
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
   dependencies:
1603
   dependencies:
1596
     ajv "^5.2.0"
1604
     ajv "^5.2.0"
1597
     babel-code-frame "^6.22.0"
1605
     babel-code-frame "^6.22.0"
1598
     chalk "^1.1.3"
1606
     chalk "^1.1.3"
1599
     concat-stream "^1.6.0"
1607
     concat-stream "^1.6.0"
1608
+    cross-spawn "^5.1.0"
1600
     debug "^2.6.8"
1609
     debug "^2.6.8"
1601
     doctrine "^2.0.0"
1610
     doctrine "^2.0.0"
1602
     eslint-scope "^3.7.1"
1611
     eslint-scope "^3.7.1"
1605
     estraverse "^4.2.0"
1614
     estraverse "^4.2.0"
1606
     esutils "^2.0.2"
1615
     esutils "^2.0.2"
1607
     file-entry-cache "^2.0.0"
1616
     file-entry-cache "^2.0.0"
1617
+    functional-red-black-tree "^1.0.1"
1608
     glob "^7.1.2"
1618
     glob "^7.1.2"
1609
     globals "^9.17.0"
1619
     globals "^9.17.0"
1610
     ignore "^3.3.3"
1620
     ignore "^3.3.3"
1623
     pluralize "^4.0.0"
1633
     pluralize "^4.0.0"
1624
     progress "^2.0.0"
1634
     progress "^2.0.0"
1625
     require-uncached "^1.0.3"
1635
     require-uncached "^1.0.3"
1636
+    semver "^5.3.0"
1626
     strip-json-comments "~2.0.1"
1637
     strip-json-comments "~2.0.1"
1627
     table "^4.0.1"
1638
     table "^4.0.1"
1628
     text-table "~0.2.0"
1639
     text-table "~0.2.0"
1935
   version "1.1.0"
1946
   version "1.1.0"
1936
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
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
 gauge@~1.2.5:
1953
 gauge@~1.2.5:
1939
   version "1.2.7"
1954
   version "1.2.7"
1940
   resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93"
1955
   resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93"
4129
   version "1.0.5"
4144
   version "1.0.5"
4130
   resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
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
 shell-quote@1.6.1, shell-quote@^1.6.1:
4157
 shell-quote@1.6.1, shell-quote@^1.6.1:
4133
   version "1.6.1"
4158
   version "1.6.1"
4134
   resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
4159
   resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
4139
     jsonify "~0.0.0"
4164
     jsonify "~0.0.0"
4140
 
4165
 
4141
 shell-utils@1.x.x:
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
   dependencies:
4169
   dependencies:
4145
     lodash "4.x.x"
4170
     lodash "4.x.x"
4146
 
4171
 
4336
     has-flag "^1.0.0"
4361
     has-flag "^1.0.0"
4337
 
4362
 
4338
 supports-color@^4.0.0:
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
   dependencies:
4366
   dependencies:
4342
     has-flag "^2.0.0"
4367
     has-flag "^2.0.0"
4343
 
4368