Skip to content

Commit

Permalink
fix(travis): lib build without ngcc (demo issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
kekel87 authored and Neonox31 committed Apr 8, 2020
1 parent f1fdb84 commit e6fe3eb
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 74 deletions.
148 changes: 75 additions & 73 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,75 @@
language: node_js
sudo: false
node_js:
- '10'
install:
- yarn
cache:
timeout: 3600
yarn: true
directories:
- node_modules
- projects/ngx-openlayers/node_modules
- dist

jobs:
include:
- stage: check
name: next lib linting
script:
- yarn lint

- stage: build
name: next lib and demo
script:
- yarn build --prod --base-href "/ngx-openlayers/" --progress false

- stage: release
name: next lib version on github releases
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cd dist/ngx-openlayers
- cp ../../projects/ngx-openlayers/CHANGELOG.md CHANGELOG.md
- npm pack
deploy:
- provider: releases
prerelease: true
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: '*.tgz'
skip_cleanup: true
on:
tags: true

- stage: release
name: next demo on github pages
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cd dist/demo-ngx-openlayers
deploy:
- provider: pages
local_dir: dist/demo-ngx-openlayers
skip_cleanup: true
github_token: $GITHUB_OAUTH_TOKEN
on:
tags: true

- stage: deploy
name: next lib version on npm
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md
- cd dist/ngx-openlayers
deploy:
- provider: npm
email: $NPM_EMAIL
api_key: $NPM_TOKEN
tag: next
skip_cleanup: true
on:
tags: true
language: node_js
sudo: false
node_js:
- '10'
install:
- yarn
cache:
timeout: 3600
yarn: true
directories:
- node_modules
- projects/ngx-openlayers/node_modules
- dist

jobs:
include:
- stage: check
name: next lib linting
script:
- yarn lint

- stage: build
name: next lib and demo
script:
- yarn build:lib
- cp -r dist/ngx-openlayers dist/ngx-openlayers-publish
- yarn build:demo --base-href "/ngx-openlayers/" --progress false

- stage: release
name: next lib version on github releases
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cd dist/ngx-openlayers-publish
- cp ../../projects/ngx-openlayers/CHANGELOG.md CHANGELOG.md
- npm pack
deploy:
- provider: releases
prerelease: true
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: '*.tgz'
skip_cleanup: true
on:
tags: true

- stage: release
name: next demo on github pages
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cd dist/demo-ngx-openlayers
deploy:
- provider: pages
local_dir: dist/demo-ngx-openlayers
skip_cleanup: true
github_token: $GITHUB_OAUTH_TOKEN
on:
tags: true

- stage: deploy
name: next lib version on npm
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
script: 'true' # skips tests
before_deploy:
- cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers-publish/CHANGELOG.md
- cd dist/ngx-openlayers-publish
deploy:
- provider: npm
email: $NPM_EMAIL
api_key: $NPM_TOKEN
tag: next
skip_cleanup: true
on:
tags: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"ng": "ng",
"start": "yarn build:lib && ng serve",
"build:lib": "ng build ngx-openlayers --prod",
"build": "yarn build:lib && ng build demo-ngx-openlayers",
"build:demo": "ng build demo-ngx-openlayers",
"build": "yarn build:lib && yarn build:demo",
"test": "yarn build:lib && ng test",
"lint": "ng lint",
"e2e": "yarn build:lib && ng e2e",
Expand Down

0 comments on commit e6fe3eb

Please sign in to comment.