This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(release): add tasks "grunt version" and "grunt version:patch" to …
…create release tags
- Loading branch information
Showing
7 changed files
with
105 additions
and
37 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
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,26 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
// takes care of bumping the version number in package.json | ||
|
||
module.exports = function (grunt) { | ||
'use strict'; | ||
|
||
grunt.config('bump', { | ||
options: { | ||
files: ['package.json', 'npm-shrinkwrap.json'], | ||
bumpVersion: true, | ||
commit: true, | ||
commitMessage: 'Release v%VERSION%', | ||
commitFiles: ['package.json', 'npm-shrinkwrap.json', 'CHANGELOG'], | ||
createTag: true, | ||
tagName: 'v%VERSION%', | ||
tagMessage: 'Version %VERSION%', | ||
push: false, | ||
pushTo: 'origin', | ||
gitDescribeOptions: '--tags --always --abrev=1 --dirty=-d' | ||
} | ||
}); | ||
}; | ||
|
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,27 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
module.exports = function (grunt) { | ||
'use strict'; | ||
|
||
grunt.config('copyright', { | ||
app: { | ||
options: { | ||
pattern: 'This Source Code Form is subject to the terms of the Mozilla Public' | ||
}, | ||
src: [ | ||
'{,config/}*.js', | ||
'{,bans/,bin/,grunttasks/,scripts/,test/}*.js' | ||
] | ||
}, | ||
tests: { | ||
options: { | ||
pattern: 'Any copyright is dedicated to the Public Domain.' | ||
}, | ||
src: [ | ||
'test/{remote,local}/*.js' | ||
] | ||
} | ||
}) | ||
} |
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,16 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
module.exports = function (grunt) { | ||
'use strict'; | ||
|
||
grunt.config('jshint', { | ||
files: [ | ||
'{,bans/,bin/,config/,grunttasks/,scripts/,test/**/}*.js' | ||
], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}) | ||
} |
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,31 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
// | ||
// A task to stamp a new version. | ||
// | ||
// Before running this task you should update CHANGELOG with the | ||
// changes for this release. Protip: you only need to make changes | ||
// to CHANGELOG; this task will add and commit for you. | ||
// | ||
// * version is updated in package.json | ||
// * git tag with version name is created. | ||
// * git commit with updated package.json created. | ||
// | ||
// NOTE: This task will not push this commit for you. | ||
// | ||
|
||
module.exports = function (grunt) { | ||
'use strict'; | ||
|
||
grunt.registerTask('version', [ | ||
'bump-only:minor', | ||
'bump-commit' | ||
]); | ||
|
||
grunt.registerTask('version:patch', [ | ||
'bump-only:patch', | ||
'bump-commit' | ||
]); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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