Skip to content

Commit

Permalink
Use grunt-yabs for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Jun 26, 2014
1 parent eb315e2 commit 2643808
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 34 deletions.
69 changes: 42 additions & 27 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ module.exports = (grunt) ->
" * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n"

bumpup:
options:
dateformat: "YYYY-MM-DD HH:mm"
normalize: true
updateProps:
pkg: "package.json"
files: ["package.json", "bower.json", "fancytree.jquery.json"]

checkrepo:
beforeBump:
tag:
eq: "<%= pkg.version %>" # Check if highest repo tag == pkg.version
# tagged: false # Require last commit (HEAD) to be tagged
clean: true # // Require repo to be clean (no unstaged changes)
beforeRelease:
tag:
lt: "<%= pkg.version %>" # Check if highest repo tag is lower than pkg.version
# tagged: false # Require last commit (HEAD) to be tagged
clean: true # // Require repo to be clean (no unstaged changes)
# bumpup:
# options:
# dateformat: "YYYY-MM-DD HH:mm"
# normalize: true
# updateProps:
# pkg: "package.json"
# files: ["package.json", "bower.json", "fancytree.jquery.json"]

# checkrepo:
# beforeBump:
# tag:
# eq: "<%= pkg.version %>" # Check if highest repo tag == pkg.version
# # tagged: false # Require last commit (HEAD) to be tagged
# clean: true # // Require repo to be clean (no unstaged changes)
# beforeRelease:
# tag:
# lt: "<%= pkg.version %>" # Check if highest repo tag is lower than pkg.version
# # tagged: false # Require last commit (HEAD) to be tagged
# clean: true # // Require repo to be clean (no unstaged changes)

clean:
build:
Expand Down Expand Up @@ -286,12 +286,12 @@ module.exports = (grunt) ->
]
testname: "fancytree qunit tests"

tagrelease:
file: "package.json"
commit: true
message: "Tagging the %version% release."
prefix: "v"
annotate: true
# tagrelease:
# file: "package.json"
# commit: true
# message: "Tagging the %version% release."
# prefix: "v"
# annotate: true

uglify:
# build:
Expand Down Expand Up @@ -337,6 +337,21 @@ module.exports = (grunt) ->
files: ["src/*.js", "test/unit/*.js"]
tasks: ["jshint:beforeConcat"]

yabs:
release:
common: # defaults for all tools
manifests: ['package.json', 'bower.json', 'fancytree.jquery.json']
# The following tools are run in order:
check: { clean: true, branch: ['master'] }
run_test: { tasks: ['test'] }
bump: {} # 'bump' also uses the increment mode `yabs:release:MODE`
run_build: { tasks: ['build'] }
commit: { add: '.' }
tag: {}
push: { tags: true }
bump_develop: { inc: 'prepatch' }
commit_develop: { add: '.', message: 'Bump prerelease ({%= version %}) [ci skip]' }
# push_develop: {}

# ----------------------------------------------------------------------------

Expand Down Expand Up @@ -395,8 +410,8 @@ module.exports = (grunt) ->
"clean:build"
"replace:release"
"compress:dist"
"tagrelease"
"bumpup:prerelease"
# "tagrelease"
# "bumpup:prerelease"
]

grunt.registerTask "upload", [
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.fancytree",
"title": "jQuery Fancytree Plugin",
"description": "Fancytree is a JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop, and lazy loading.",
"version": "2.1.0-0",
"version": "2.1.0",
"homepage": "https://github.com/mar10/fancytree",
"author": {
"name": "Martin Wendt",
Expand Down Expand Up @@ -33,23 +33,24 @@
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-jshint": "~0.3.0",
"grunt-contrib-less": "~0.8.1",
"grunt-contrib-qunit": "~0.2.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-docco": "~0.3.2",
"grunt-exec": "~0.4.0",
"grunt-html": "~0.3.3",
"grunt-jsdoc": "~0.5.1",
"grunt-saucelabs": "~4.1.2",
"grunt-tagrelease": "^0.3.3",
"grunt-text-replace": "~0.3.7",
"qunitjs": "1.x",
"grunt-saucelabs": "~4.1.2",
"grunt-jsdoc": "~0.5.1",
"grunt-yabs": "0.0.5",
"ink-docstrap": "git://github.com/terryweiss/docstrap",
"grunt-docco": "~0.3.2",
"grunt-contrib-cssmin": "~0.7.0"
"qunitjs": "1.x"
},
"scripts": {
"test": "grunt ci --verbose"
}
}
}

0 comments on commit 2643808

Please sign in to comment.