Skip to content

Commit 2e9d4c1

Browse files
committed
ci: use custom npm scripts to deploy
1 parent 8456381 commit 2e9d4c1

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ script:
1919
before_deploy:
2020
- set -e
2121
- npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
22+
- git remote set-url origin https://user:[email protected]/$TRAVIS_REPO_SLUG.git
2223
- git fetch origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
2324
- git checkout $TRAVIS_BRANCH
2425
- yarn run standard-version -a --no-verify || echo "nothing changed"
2526

2627
deploy:
2728
provider: script
2829
skip_cleanup: true
29-
script: yarn run lerna publish from-package --amend --yes
30+
script: yarn run run-s -n "deploy:**" || echo "nothing changed to deploy"
3031
on:
3132
branch: master

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"build": "tsc -b",
1414
"test": "jest",
1515
"lint": "EFF_NO_LINK_RULES=true eslint . --ext js,mdx,ts,tsx -f friendly",
16-
"prepublishOnly": "lerna version \"$(jq -r '.version' package.json)\" --amend --yes",
17-
"postpublish": "git push --follow-tags origin $TRAVIS_BRANCH"
16+
"deploy:pre": "lerna version \"$(jq -r '.version' package.json)\" --amend --yes",
17+
"deploy:run": "lerna publish from-package --amend --yes",
18+
"deploy:post": "git push --follow-tags origin $TRAVIS_BRANCH"
1819
},
1920
"devDependencies": {
2021
"@commitlint/config-conventional": "^8.1.0",
@@ -35,6 +36,7 @@
3536
"jest": "^24.8.0",
3637
"lerna": "^3.16.4",
3738
"lint-staged": "^9.2.1",
39+
"npm-run-all": "^4.1.5",
3840
"prettier": "1.18.2",
3941
"prettier-config-1stg": "^0.1.0",
4042
"react": "^16.8.6",

yarn.lock

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,11 @@ array-equal@^1.0.0:
16851685
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
16861686
integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=
16871687

1688+
array-filter@~0.0.0:
1689+
version "0.0.1"
1690+
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
1691+
integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw=
1692+
16881693
array-find-index@^1.0.1:
16891694
version "1.0.2"
16901695
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
@@ -1703,6 +1708,16 @@ array-includes@^3.0.3:
17031708
define-properties "^1.1.2"
17041709
es-abstract "^1.7.0"
17051710

1711+
array-map@~0.0.0:
1712+
version "0.0.0"
1713+
resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
1714+
integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=
1715+
1716+
array-reduce@~0.0.0:
1717+
version "0.0.0"
1718+
resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
1719+
integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=
1720+
17061721
array-union@^1.0.2:
17071722
version "1.0.2"
17081723
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
@@ -2942,7 +2957,7 @@ error-ex@^1.2.0, error-ex@^1.3.1:
29422957
dependencies:
29432958
is-arrayish "^0.2.1"
29442959

2945-
es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.5.1, es-abstract@^1.7.0:
2960+
es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.7.0:
29462961
version "1.13.0"
29472962
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
29482963
integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
@@ -3638,7 +3653,7 @@ fsevents@^1.2.7:
36383653
nan "^2.12.1"
36393654
node-pre-gyp "^0.12.0"
36403655

3641-
function-bind@^1.1.1:
3656+
function-bind@^1.0.2, function-bind@^1.1.1:
36423657
version "1.1.1"
36433658
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
36443659
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
@@ -5025,6 +5040,11 @@ jsonfile@^4.0.0:
50255040
optionalDependencies:
50265041
graceful-fs "^4.1.6"
50275042

5043+
jsonify@~0.0.0:
5044+
version "0.0.0"
5045+
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
5046+
integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=
5047+
50285048
jsonparse@^1.2.0:
50295049
version "1.3.1"
50305050
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
@@ -5460,6 +5480,11 @@ mem@^4.0.0:
54605480
mimic-fn "^2.0.0"
54615481
p-is-promise "^2.0.0"
54625482

5483+
memorystream@^0.3.1:
5484+
version "0.3.1"
5485+
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
5486+
integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI=
5487+
54635488
54645489
version "5.0.0"
54655490
resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
@@ -5908,6 +5933,21 @@ npm-pick-manifest@^2.2.3:
59085933
npm-package-arg "^6.0.0"
59095934
semver "^5.4.1"
59105935

5936+
npm-run-all@^4.1.5:
5937+
version "4.1.5"
5938+
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba"
5939+
integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==
5940+
dependencies:
5941+
ansi-styles "^3.2.1"
5942+
chalk "^2.4.1"
5943+
cross-spawn "^6.0.5"
5944+
memorystream "^0.3.1"
5945+
minimatch "^3.0.4"
5946+
pidtree "^0.3.0"
5947+
read-pkg "^3.0.0"
5948+
shell-quote "^1.6.1"
5949+
string.prototype.padend "^3.0.0"
5950+
59115951
npm-run-path@^2.0.0:
59125952
version "2.0.2"
59135953
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@@ -6398,6 +6438,11 @@ picomatch@^2.0.5:
63986438
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
63996439
integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==
64006440

6441+
pidtree@^0.3.0:
6442+
version "0.3.0"
6443+
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b"
6444+
integrity sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==
6445+
64016446
pify@^2.0.0, pify@^2.3.0:
64026447
version "2.3.0"
64036448
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -7200,6 +7245,16 @@ shebang-regex@^1.0.0:
72007245
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
72017246
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
72027247

7248+
shell-quote@^1.6.1:
7249+
version "1.6.1"
7250+
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
7251+
integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=
7252+
dependencies:
7253+
array-filter "~0.0.0"
7254+
array-map "~0.0.0"
7255+
array-reduce "~0.0.0"
7256+
jsonify "~0.0.0"
7257+
72037258
shellwords@^0.1.1:
72047259
version "0.1.1"
72057260
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
@@ -7510,6 +7565,15 @@ string-width@^3.0.0, string-width@^3.1.0:
75107565
is-fullwidth-code-point "^2.0.0"
75117566
strip-ansi "^5.1.0"
75127567

7568+
string.prototype.padend@^3.0.0:
7569+
version "3.0.0"
7570+
resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0"
7571+
integrity sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=
7572+
dependencies:
7573+
define-properties "^1.1.2"
7574+
es-abstract "^1.4.3"
7575+
function-bind "^1.0.2"
7576+
75137577
string_decoder@^1.1.1:
75147578
version "1.2.0"
75157579
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d"

0 commit comments

Comments
 (0)