Skip to content

Commit 6716852

Browse files
committed
chore(build): Add grunt-bump and changelog
1 parent ff041cb commit 6716852

8 files changed

+67
-9
lines changed

Diff for: CONTRIBUTORS.md renamed to AUTHORS

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
Glen Mailer
2-
Peter deHaan
3-
Shane Tomlinson
41
Vlad Filippov
5-
vladikoff
62
Zach Carter
7-
Zachary Carter
3+
Peter deHaan
4+
Glen Mailer
5+
Brian Warner
6+
Shane Tomlinson

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<a name="0.1.20"></a>
2+
### 0.1.20 (2014-05-16)
3+
4+
5+
#### Bug Fixes
6+
7+
* **xhr:** make the default payload null ([83666223](https://github.com/mozilla/fxa-js-client/commit/83666223b6fdf4c6993bb4fefce9f0d63c6b38d4))

Diff for: CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ This library uses [The Intern](https://github.com/theintern/intern/wiki) testing
4343

4444
`grunt intern:sauce` - Run tests on SauceLabs.
4545

46+
## Git Commit Guidelines
47+
48+
We loosely follow the [Angular commit guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type) of `<type>(<scope>): <subject>` where `type` must be one of:
49+
50+
* **feat**: A new feature
51+
* **fix**: A bug fix
52+
* **docs**: Documentation only changes
53+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
54+
semi-colons, etc)
55+
* **refactor**: A code change that neither fixes a bug or adds a feature
56+
* **perf**: A code change that improves performance
57+
* **test**: Adding missing tests
58+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
59+
generation
60+
4661
## Documentation
4762

4863
Running `grunt doc` will create a `docs` directory, browse the documentation by opening `docs/index.html`.

Diff for: Gruntfile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = function (grunt) {
99
grunt.loadNpmTasks('intern-geezer');
1010

1111
grunt.initConfig({
12-
pkg: grunt.file.readJSON('package.json')
12+
pkg: grunt.file.readJSON('package.json'),
13+
pkgReadOnly: grunt.file.readJSON('package.json')
1314
});
1415

1516
// load local Grunt tasks
@@ -31,7 +32,7 @@ module.exports = function (grunt) {
3132
['build']);
3233

3334
grunt.registerTask('release',
34-
['build', 'yuidoc', 'buildcontrol']);
35+
['build', 'bump-only', 'changelog', 'bump-commit', 'yuidoc', 'buildcontrol']);
3536

3637
grunt.registerTask('dev',
3738
['watch:dev']);

Diff for: package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"grunt-open": "~0.2.2",
5151
"intern-geezer": "~1.7.0",
5252
"load-grunt-tasks": "~0.2.0",
53-
"http-proxy": "~1.0.2"
53+
"http-proxy": "~1.0.2",
54+
"grunt-bump": "0.0.13",
55+
"grunt-conventional-changelog": "~1.1.0"
5456
}
5557
}

Diff for: tasks/buildcontrol.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function (grunt) {
2222
options: {
2323
branch: 'gh-pages',
2424
dir: 'docs',
25-
tag: '<%= pkg.version %>-docs'
25+
tag: 'docs-<%= pkg.version %>'
2626
}
2727
}
2828
});

Diff for: tasks/bump.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
module.exports = function (grunt) {
6+
'use strict';
7+
8+
grunt.config('bump', {
9+
options: {
10+
files: ['package.json'],
11+
updateConfigs: ['pkg'],
12+
push: true,
13+
pushTo: '[email protected]:mozilla/fxa-js-client.git master',
14+
commitMessage: 'source-%VERSION%',
15+
tagName: 'source-%VERSION%',
16+
// commit all modified files
17+
commitFiles: ['-a'],
18+
commit: true
19+
}
20+
});
21+
};

Diff for: tasks/changelog.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
module.exports = function (grunt) {
6+
'use strict';
7+
8+
grunt.config('changelog', {
9+
options: {
10+
from: 'source-<%= pkgReadOnly.version %>'
11+
}
12+
});
13+
};

0 commit comments

Comments
 (0)