forked from NationalBankBelgium/stark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): added release and publish support. Closes NationalBankBe…
…lgium#54. Closes NationalBankBelgium#24. Closes NationalBankBelgium#27
- Loading branch information
1 parent
75ff9c5
commit 108e077
Showing
14 changed files
with
432 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ dist/ | |
dist/ | ||
.tmp/ | ||
/.tmp/ | ||
tmp/ | ||
|
||
|
||
# Reports directory | ||
reports/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"non-interactive": false, | ||
"dry-run": false, | ||
"verbose": false, | ||
"force": false, | ||
"pkgFiles": ["package.json"], | ||
"increment": "patch", | ||
"buildCommand": false, | ||
"safeBump": true, | ||
"beforeChangelogCommand": false, | ||
"requireCleanWorkingDir": true, | ||
"requireUpstream": true, | ||
"src": { | ||
"commit": true, | ||
"commitMessage": "chore(release): release %s", | ||
"commitArgs": "", | ||
"tag": true, | ||
"tagName": "%s", | ||
"tagAnnotation": "%s", | ||
"push": true, | ||
"pushArgs": "", | ||
"pushRepo": null, | ||
"beforeStartCommand": false, | ||
"afterReleaseCommand": false | ||
}, | ||
"npm": { | ||
"publish": false | ||
}, | ||
"github": { | ||
"release": true, | ||
"releaseName": "Release %s", | ||
"draft": false, | ||
"tokenRef": "GITHUB_TOKEN", | ||
"assets": null, | ||
"host": null | ||
}, | ||
"prompt": { | ||
"src": { | ||
"status": false, | ||
"commit": true, | ||
"tag": true, | ||
"push": true, | ||
"release": true, | ||
"publish": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<a name="10.0.0-alpha.1"></a> | ||
# 10.0.0-alpha.1 (2018-03-29) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **build:** fixed issue with prettier config name with webpack plugin and added new scripts at root ([51be4f6](https://github.com/nationalbankbelgium/stark/commit/51be4f6)) | ||
* **http:** fix unit tests. Enhance http demo in Starter ([#268](https://github.com/nationalbankbelgium/stark/issues/268)) ([6d609b8](https://github.com/nationalbankbelgium/stark/commit/6d609b8)), closes [#68](https://github.com/nationalbankbelgium/stark/issues/68) [#68](https://github.com/nationalbankbelgium/stark/issues/68) [#84](https://github.com/nationalbankbelgium/stark/issues/84) [#93](https://github.com/nationalbankbelgium/stark/issues/93) [angular/zone.js#1015](https://github.com/angular/zone.js/issues/1015) [#96](https://github.com/nationalbankbelgium/stark/issues/96) | ||
* **lazy-loading:** Remove PreloadAllModules preloading strategy from routing coneiguration to make lazy-loaded modules to be actually lazy loaded :) ([9634dac](https://github.com/nationalbankbelgium/stark/commit/9634dac)) | ||
* **lazy-loading:** Remove PreloadAllModules preloading strategy from routing coneiguration tz makz lazz-loaded modules to be actually lazy loaded :) ([80d09ce](https://github.com/nationalbankbelgium/stark/commit/80d09ce)) | ||
* **linting:** clean stark-build/tslint.json. Remove obsolete options for 'ban' rule ([86ed26c](https://github.com/nationalbankbelgium/stark/commit/86ed26c)) | ||
* **linting:** fix some TS linting issues ([8d5d6a8](https://github.com/nationalbankbelgium/stark/commit/8d5d6a8)) | ||
|
||
|
||
### Features | ||
|
||
* **build:** added .gitattributes. Closes [#144](https://github.com/nationalbankbelgium/stark/issues/144). ([b4c3ef2](https://github.com/nationalbankbelgium/stark/commit/b4c3ef2)) | ||
* **build:** added support for building a subset of the packages ([55ec4c1](https://github.com/nationalbankbelgium/stark/commit/55ec4c1)) | ||
* **http:** create StarkHttp module. Fixed imports. Implemented small demo in Starter [[#96](https://github.com/nationalbankbelgium/stark/issues/96)] ([201edb8](https://github.com/nationalbankbelgium/stark/commit/201edb8)) | ||
* **http:** implement Stark Http in stark-core (unit tests to be completed) [[#96](https://github.com/nationalbankbelgium/stark/issues/96)] ([579c59b](https://github.com/nationalbankbelgium/stark/commit/579c59b)) | ||
* **http:** implement Stark Http in stark-core (unit tests to be completed) [[#96](https://github.com/nationalbankbelgium/stark/issues/96)] ([719d92d](https://github.com/nationalbankbelgium/stark/commit/719d92d)) | ||
* **polyfills:** Update polyfills.browser.ts with the relevant polyfills needed only for IE11 and some special features from Angular. Add needed npm dependencies for those polyfils ([2b6a160](https://github.com/nationalbankbelgium/stark/commit/2b6a160)) | ||
* **routing:** adapt CSP style-src directive to allow inline styles from UI Router visualizer ([8a1a8fa](https://github.com/nationalbankbelgium/stark/commit/8a1a8fa)) | ||
* **routing:** add UI Router visualizer. Adapt CSP img-src directive to allow png images from UI Router visualizer ([3bc995b](https://github.com/nationalbankbelgium/stark/commit/3bc995b)) | ||
* **routing:** replace Angular Router by UI Router ([24b70d4](https://github.com/nationalbankbelgium/stark/commit/24b70d4)) | ||
* **stark-testing:** create separate stark-testing package and use it in all stark packages and starter ([#267](https://github.com/nationalbankbelgium/stark/issues/267)) ([204dc35](https://github.com/nationalbankbelgium/stark/commit/204dc35)), closes [#68](https://github.com/nationalbankbelgium/stark/issues/68) [#68](https://github.com/nationalbankbelgium/stark/issues/68) [#84](https://github.com/nationalbankbelgium/stark/issues/84) [#93](https://github.com/nationalbankbelgium/stark/issues/93) [angular/zone.js#1015](https://github.com/angular/zone.js/issues/1015) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Releasing Stark | ||
|
||
## Pre-reqs | ||
### Local | ||
On your local machine, you must configure the `GITHUB_TOKEN` environment variable. | ||
It will be used by release-it to push to and create the release page on GitHub (cfr release:prepare section below). | ||
|
||
### Travis | ||
On Travis, the following should be configured: | ||
* NPM_TOKEN environment variable | ||
* if 2FA is enabled for the account the only auth-only level can be used: https://docs.npmjs.com/getting-started/using-two-factor-authentication#levels-of-authentication | ||
* that variable MUST NEVER be logged/exposed. If exposed then the token MUST be revoked and the account password changed ASAP | ||
|
||
## Changelog | ||
First of all: *Never* edit CHANGELOG.md manually! | ||
|
||
The changelog will be updated automatically as part of the release process and based on the commit log using conventional-changelog (https://github.com/conventional-changelog) | ||
We use the Angular format for our changelog and for it to work properly, please make sure to respect our commit conventions (see CONTRIBUTING guide). | ||
|
||
## Creating a release | ||
Make sure that: | ||
* all changes have merged into master | ||
* everything is up to date locally | ||
* everything is clean locally | ||
* execute `npm run release` | ||
|
||
Enjoy the show. | ||
|
||
## Publishing the release on npm | ||
Once you have pushed the tag, Travis will handle things from there | ||
|
||
## What happens once a release is triggered | ||
|
||
### release | ||
* first we make sure that there are no local changes (if there are we stop right there) | ||
* then we execute release-it: https://github.com/webpro/release-it which | ||
* bumps the version in the root package.json automatically (determines the bump type to use depending on the commit message logs) | ||
* that version number will be used as basis in the build to adapt all other package.json files | ||
* generates/updates the CHANGELOG.md file using: conventional-changelog: https://github.com/conventional-changelog | ||
* commits both package.json and CHANGELOG.md | ||
* creates a new git tag and pushes it | ||
* creates a github release page and makes it final | ||
|
||
After this, the release is tagged and visible on github | ||
|
||
### publish | ||
Once the tag is pushed to GitHub, Travis picks it up and initiates a build. | ||
Travis executes builds, tests, then executes `npm run release:publish`. | ||
|
||
That script makes some checks then, if all succeed it publishes the different packages on npm. | ||
Checks that are performed: | ||
* node version: should be "8" | ||
* NPM_TOKEN environment variable should be defined | ||
* TRAVIS_REPO_SLUG should be "NationalBankBelgium/stark" | ||
* TRAVIS_TAG should be defined and not empty (this is the case when Travis builds for a tag) | ||
|
||
Other details can be found here: https://github.com/NationalBankBelgium/stark/issues/54 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
stark-build | ||
stark-testing | ||
stark-core |
Oops, something went wrong.