Skip to content

Commit

Permalink
feat(grunt): checkout relase branch for AMSF update
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Mar 5, 2016
1 parent 44a2108 commit 294594d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = (grunt) ->
require("jit-grunt") grunt,
"bump-commit": "grunt-bump"
"bump-only": "grunt-bump"
gitcheckout: "grunt-git"
gitclean: "grunt-git"
gitclone: "grunt-git"
gitpull: "grunt-git"
Expand Down Expand Up @@ -34,10 +35,12 @@ module.exports = (grunt) ->

amsf:
base: "_amsf"
branch: "release"
core: "<%= amsf.base %>/core"
user:
assets: "<%= config.app %>/assets"
theme:
branch: "master"
assets: "<%= amsf.user.assets %>/themes/<%= amsf.theme.current %>"
current: "<%= config.amsf.theme %>"
new_name: grunt.option("theme") or "<%= amsf.theme.current %>"
Expand Down Expand Up @@ -432,13 +435,13 @@ module.exports = (grunt) ->
amsf__core__add_remote:
options:
repository: "https://github.com/sparanoid/almace-scaffolding.git"
branch: "master"
branch: "<%= amsf.branch %>"
directory: "<%= amsf.base %>/core/"

amsf__theme__add_remote:
options:
repository: "https://github.com/<%= amsf.theme.new_author %>/amsf-<%= amsf.theme.new_name %>.git"
branch: "master"
branch: "<%= amsf.theme.branch %>"
directory: "<%= amsf.base %>/themes/<%= amsf.theme.new_name %>/"

gitpull:
Expand All @@ -450,6 +453,17 @@ module.exports = (grunt) ->
options:
cwd: "<%= amsf.base %>/themes/<%= amsf.theme.current %>/"

gitcheckout:
amsf__core__checkout_branch:
options:
cwd: "<%= gitpull.amsf__core__update_remote.options.cwd %>"
branch: "<%= amsf.branch %>"

amsf__theme__checkout_branch:
options:
cwd: "<%= gitpull.amsf__theme__update_remote.options.cwd %>"
branch: "<%= amsf.theme.branch %>"

gitclean:
options:
nonstandard: true
Expand Down Expand Up @@ -587,6 +601,7 @@ module.exports = (grunt) ->
"gitreset:amsf__theme__reset_git"
"gitclean:amsf__theme__clean_git"
"gitpull:amsf__theme__update_remote"
"gitcheckout:amsf__theme__checkout_branch"
"theme-upgrade"
]

Expand All @@ -597,6 +612,7 @@ module.exports = (grunt) ->
"gitreset:amsf__core__reset_git"
"gitclean:amsf__core__clean_git"
"gitpull:amsf__core__update_remote"
"gitcheckout:amsf__core__checkout_branch"
]
else
grunt.task.run [
Expand Down

0 comments on commit 294594d

Please sign in to comment.