Skip to content

Commit a3ca13b

Browse files
committed
Improved Travis config
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent 46d9fe9 commit a3ca13b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js: [node, lts/*]
3-
os: [linux, osx] # Windows doesn't work currently, I should try again in May 2019 (If I didn't, remind me please!)
43
cache:
54
npm: true
65
jobs:
@@ -10,9 +9,7 @@ jobs:
109
- npm run build:prod
1110
- export PKG_NAME=$(node -e "console.log(require('./dist/package/production/package').name)")
1211
- export PKG_VERSION=$(node -e "console.log(require('./dist/package/production/package').version)")
13-
- npm run test:coverage
14-
- cp -r dist/homepage/$PKG_NAME/$PKG_VERSION page
15-
- cp -r dist/jest/coverage/lcov-report page/coverage
12+
- if [[ -d dist/homepage/$PKG_NAME/$PKG_VERSION ]]; then; npm run test:coverage && cp -r dist/homepage/$PKG_NAME/$PKG_VERSION page && cp -r dist/jest/coverage/lcov-report page/coverage; fi
1613
- cd dist/package/production
1714
- zip -9 --recurse-paths ../../${PKG_NAME}_v$PKG_VERSION.zip **
1815
- zip -9 --recurse-paths ../../${PKG_NAME}_v${PKG_VERSION}_min.zip ** --exclude \*.d.ts --exclude readme.* --exclude \*.map
@@ -23,6 +20,7 @@ jobs:
2320
fqdn: $PKG_NAME.jaid.codes
2421
skip_cleanup: true
2522
github_token: $GITHUB_TOKEN # Permissions: public_repo, repo:status, repo_deployment
23+
on: { condition: -d pages }
2624
- provider: releases
2725
file_glob: true
2826
file:

0 commit comments

Comments
 (0)