Skip to content

Commit 46a7337

Browse files
Tweak ordering of publish script (stripe#52)
1 parent d401405 commit 46a7337

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ language: node_js
22
node_js: 'lts/*'
33
cache: yarn
44
script:
5-
- yarn run ci
5+
- yarn run test
6+
- yarn run build

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"jsnext:main": "dist/stripe.esm.js",
88
"types": "types/index.d.ts",
99
"scripts": {
10-
"test": "jest",
10+
"test": "yarn lint && yarn test:unit && yarn test:versions && yarn test:types && yarn typecheck",
11+
"test:unit": "jest",
1112
"test:versions": "./tests/versions/scripts/test.sh",
1213
"test:types": "tsc -p ./tests/types && jest --roots '<rootDir>/tests/types'",
1314
"lint": "eslint '{src,types}/**/*.{ts,js}' && yarn prettier-list-different",
1415
"typecheck": "tsc",
1516
"build": "yarn clean && yarn rollup -c",
1617
"clean": "rimraf dist",
17-
"ci": "yarn lint && yarn test && yarn test:versions && yarn test:types && yarn typecheck && yarn build",
1818
"prepublishOnly": "echo \"\nPlease use ./scripts/publish instead\n\" && exit 1",
1919
"prettier": "prettier './**/*.{js,ts,md,html,css}' --write",
2020
"prettier-list-different": "prettier './**/*.{js,ts,md,html,css}' --list-different"

scripts/publish

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,17 @@ fi
121121
echo "Installing dependencies according to lockfile"
122122
yarn -s install --frozen-lockfile
123123

124-
echo "Linting, testing, and building"
125-
yarn -s run ci
124+
echo "Running tests"
125+
yarn -s run test
126126

127-
echo "Tagging and publishing $RELEASE_TYPE release"
128-
yarn -s --ignore-scripts publish --$RELEASE_TYPE --access=public
127+
echo "Bumping package.json $RELEASE_TYPE version and tagging commit"
128+
yarn -s version --$RELEASE_TYPE
129+
130+
echo "Building"
131+
yarn -s run build
132+
133+
echo "Publishing release"
134+
yarn -s --ignore-scripts publish --non-interactive --access=public
129135

130136
echo "Pushing git commit and tag"
131137
git push --follow-tags

0 commit comments

Comments
 (0)