Skip to content

Commit

Permalink
Merge pull request #45 from cloudnc/feat/fix-travis-add-commitizen
Browse files Browse the repository at this point in the history
fix(CI): Fix CI not exiting before deploy when script fails
  • Loading branch information
zakhenry authored Jun 10, 2019
2 parents ea677d4 + 34f4b40 commit ac1224e
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 77 deletions.
27 changes: 13 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ cache: yarn

install:
- yarn --frozen-lockfile --non-interactive --no-progress
- yarn global add http-server-spa

script:
# lint
Expand All @@ -21,22 +20,22 @@ script:
- yarn run demo:build:prod --progress=false --base-href "https://cloudnc.github.io/ngx-sub-form/"
# e2e tests
- sed -i 's/<base href="https:\/\/cloudnc.github.io\/ngx-sub-form\/">/<base href="\/">/g' dist/ngx-sub-form-demo/index.html
- cd ./dist/ngx-sub-form-demo
- nohup http-server-spa . index.html 4765 &
- cd ../..
- nohup http-server-spa ./dist/ngx-sub-form-demo index.html 4765 &
- sleep 5
- yarn run demo:test:e2e:ci
- sed -i 's/<base href="\/">/<base href="https:\/\/cloudnc.github.io\/ngx-sub-form\/">/g' dist/ngx-sub-form-demo/index.html

# publish to npm
- yarn global add cpy-cli --ignore-engines
- cpy README.md dist/ngx-sub-form
- test $TRAVIS_BRANCH = "master" && yarn run semantic-release || echo "Skipping deploy"
- cp README.md LICENSE dist/ngx-sub-form

deploy:
skip_cleanup: true
provider: pages
github_token: $GH_TOKEN
local_dir: dist/ngx-sub-form-demo
on:
branch: master
- provider: script
skip_cleanup: true
script: yarn semantic-release
on:
branch: master
- provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: dist/ngx-sub-form-demo
on:
branch: master
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 CloudNC Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Works well with polymorphic data structures.

`ngx-sub-form` is here to help you **avoid** passing your `formGroup` as inputs and tackle down the boilerplate of creating a custom [`ControlValueAccessor`](https://angular.io/api/forms/ControlValueAccessor).

[![npm version](https://badge.fury.io/js/ngx-sub-form.svg)](https://www.npmjs.com/package/ngx-sub-form)
[![Build Status](https://travis-ci.org/cloudnc/ngx-sub-form.svg?branch=master)](https://travis-ci.org/cloudnc/ngx-sub-form)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://commitizen.github.io/cz-cli/)

## Install

Install the [npm package](https://www.npmjs.com/package/ngx-sub-form): `ngx-sub-form`
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ngx-sub-form-demo",
"version": "0.0.0-development",
"license": "MIT",
"scripts": {
"------------------ BASE COMMANDS -----------------": "",
"ng": "ng",
Expand All @@ -26,7 +27,8 @@
"------------------ Quick Commands ------------------": "",
"lint:fix": "yarn demo:lint:fix && yarn prettier:write",
"semantic-release": "semantic-release",
"test": "yarn lib:test:watch"
"test": "yarn lib:test:watch",
"commit": "git add . && git-cz"
},
"private": true,
"resolutions": {
Expand All @@ -45,6 +47,7 @@
"@angular/platform-browser-dynamic": "7.2.3",
"@angular/router": "7.2.3",
"@types/uuid": "3.4.4",
"commitizen": "3.1.1",
"core-js": "2.6.3",
"rxjs": "6.4.0",
"uuid": "3.3.2",
Expand All @@ -62,6 +65,8 @@
"@types/node": "10.12.21",
"codelyzer": "4.5.0",
"cypress": "3.2.0",
"cz-conventional-changelog": "2.1.0",
"http-server-spa": "1.3.0",
"jasmine-core": "2.99.1",
"jasmine-spec-reporter": "4.2.1",
"karma": "3.0.0",
Expand All @@ -82,5 +87,10 @@
"repository": {
"type": "git",
"url": "https://github.com/cloudnc/ngx-sub-form.git"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
11 changes: 10 additions & 1 deletion projects/ngx-sub-form/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"name": "ngx-sub-form",
"version": "0.0.1",
"license": "MIT",
"peerDependencies": {
"@angular/common": "^7.0.0",
"@angular/core": "^7.0.0"
}
},
"keywords": [
"Angular",
"ngx",
"SubForm",
"Nested",
"Reactive",
"ControlValueAccessor"
]
}
Loading

0 comments on commit ac1224e

Please sign in to comment.