mirror of
https://github.com/sparanoid/chinese-copywriting-guidelines.git
synced 2026-04-05 20:51:24 +08:00
feat(grunt): better version handling
This commit is contained in:
@@ -9,23 +9,34 @@ module.exports = (grunt) ->
|
|||||||
config:
|
config:
|
||||||
pkg: grunt.file.readJSON("package.json")
|
pkg: grunt.file.readJSON("package.json")
|
||||||
|
|
||||||
release:
|
"npm-contributors":
|
||||||
options:
|
options:
|
||||||
changelog: false,
|
commitMessage: "feat(package): update contributors"
|
||||||
file: "package.json"
|
|
||||||
npm: false
|
conventionalChangelog:
|
||||||
commitMessage: "chore: release <%= version %>"
|
options:
|
||||||
tagName: "v<%= version %>"
|
changelogOpts:
|
||||||
tagMessage: "chore: tagging version <%= version %>"
|
preset: "angular"
|
||||||
afterBump: [
|
|
||||||
"changelog"
|
dist:
|
||||||
]
|
src: "CHANGELOG.md"
|
||||||
# Dev options
|
|
||||||
commit: false
|
bump:
|
||||||
tag: false
|
options:
|
||||||
|
files: ["package.json"]
|
||||||
|
commitMessage: 'chore: release v%VERSION%'
|
||||||
|
commitFiles: ["-a"]
|
||||||
|
tagMessage: 'chore: create tag %VERSION%'
|
||||||
push: false
|
push: false
|
||||||
pushTags: false
|
|
||||||
|
|
||||||
grunt.registerTask "default", "Default task aka. build task", [
|
grunt.registerTask "default", "Default task aka. build task", [
|
||||||
"changelog"
|
"changelog"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
grunt.registerTask "default", "Default task aka. build task", (type) ->
|
||||||
|
grunt.task.run [
|
||||||
|
"npm-contributors"
|
||||||
|
"bump-only:#{type or 'patch'}"
|
||||||
|
"conventionalChangelog"
|
||||||
|
"bump-commit"
|
||||||
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user