Skip to content

Commit 55a0751

Browse files
authored
Merge pull request #554 from dlabrecq/symantic-release
Semantic release
2 parents da3f15e + 56537f7 commit 55a0751

File tree

3 files changed

+49
-20
lines changed

3 files changed

+49
-20
lines changed

.travis.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ language: node_js
22
node_js:
33
- '4'
44

5+
cache:
6+
directories:
7+
- node_modules
8+
9+
notifications:
10+
email: false
11+
512
env:
613
global:
714
- ENCRYPTION_LABEL: "aa286ccd339e"
@@ -11,14 +18,21 @@ env:
1118

1219
before_install:
1320
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
14-
- if [[ -n ${NPM_TOKEN} ]]; then echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc; fi
1521
- npm install -g bower grunt-cli
16-
- npm install git+https://github.com/patternfly/patternfly-eng-release.git
22+
- npm install patternfly-eng-release
23+
- npm install semantic-release
1724

1825
install: true
1926

2027
script:
28+
- if [[ -n "$NPM_TOKEN" && -n "$GH_TOKEN" ]]; then npm run semantic-release-pre; fi
2129
- sh -x ./node_modules/patternfly-eng-release/scripts/_build.sh -a
2230

2331
after_success:
32+
- npm prune
33+
- npm run semantic-release
2434
- ./scripts/publish-ghpages.sh -t docs
35+
36+
branches:
37+
except:
38+
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -208,33 +208,38 @@ After executing this tasks you'll be able to access the documentation at [http:/
208208
$ npm run ngdocs:view -- --port=8002
209209
```
210210
211-
## Releasing
211+
## Git Commit Guidelines
212212
213-
Angular PatternFly is released through Bower and npm. To release a new version version of Angular PatternFly, edit `bower.json` and `package.json` accordingly.
213+
PatternFly uses a semantic release process to automate npm and bower package publishing, based on the following commit message format.
214+
215+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
216+
format that includes a **type**, a **scope** and a **subject** ([full explanation](https://github.com/stevemao/conventional-changelog-angular/blob/master/convention.md)):
214217
215-
Update the version listed in `bower.json` by editing the file and changing the line:
216218
```
217-
"version": "<new_version>"
219+
<type>(<scope>): <subject>
220+
<BLANK LINE>
221+
<body>
222+
<BLANK LINE>
223+
<footer>
218224
```
219225
220-
Update the patternfly reference version listed in `bower.json` by editing the file and changing the line below. Angular patternfly has a dependency on the patternfly reference implementation so the major and minor version numbers of the two project should be the same:
226+
##### Patch Release
227+
221228
```
222-
"patternfly": "<new_version>"
229+
fix(pencil): stop graphite breaking when too much pressure applied
223230
```
224231
232+
##### Feature Release
225233
226-
Update the version listed in `package.json` by editing the file and changing the line:
227234
```
228-
"version": "<new_version>"
235+
feat(pencil): add 'graphiteWidth' option
229236
```
230237
231-
Commit the version bump:
232-
```shell
233-
$ git commit -m "Version bump to <new_version>"
234-
```
238+
##### Breaking Release
235239
236-
Publish a new set of release notes with ```new version``` as the tag version:
237-
https://github.com/patternfly/angular-patternfly/releases/new
240+
```
241+
perf(pencil): remove graphiteWidth option
242+
```
238243
239244
## Contributing
240245

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"karma-phantomjs-launcher": "^1.0.0",
5454
"matchdep": "0.3.0",
5555
"nsp": "^2.6.1",
56-
"patternfly-eng-release": "3.26.6"
56+
"patternfly-eng-release": "^3.26.9",
57+
"semantic-release": "^6.3.6"
5758
},
5859
"optionalDependencies": {
5960
"angularjs-datatables": "^0.5.7",
@@ -67,10 +68,17 @@
6768
"jquery": "~3.2.1",
6869
"moment": "~2.14.1"
6970
},
71+
"release": {
72+
"branch": "master-dist",
73+
"debug": false,
74+
"verifyConditions": {
75+
"path": "./node_modules/semantic-release/src/lib/plugin-noop.js"
76+
}
77+
},
7078
"scripts": {
71-
"clean":"grunt clean",
79+
"clean": "grunt clean",
7280
"build": "grunt build",
73-
"watch":"grunt watch",
81+
"watch": "grunt watch",
7482
"ngdocs": "grunt ngdocs",
7583
"ngdocs:view": "grunt ngdocs:view",
7684
"ngdocs:publish": "grunt ngdocs:publish",
@@ -79,7 +87,9 @@
7987
"check": "grunt check",
8088
"help": "grunt help",
8189
"serve": "grunt serve",
82-
"start": "grunt serve"
90+
"start": "grunt serve",
91+
"semantic-release": "npm publish && semantic-release post",
92+
"semantic-release-pre": "semantic-release pre"
8393
},
8494
"repository": {
8595
"type": "git",

0 commit comments

Comments
 (0)