Improve release tasks.

This commit is contained in:
ccd0 2015-02-25 20:35:59 -08:00
parent 2c8d7de17c
commit 64dbed7778

View File

@ -143,27 +143,30 @@ module.exports = (grunt) ->
command: """ command: """
git tag -af beta -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." git tag -af beta -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
git checkout gh-pages git checkout gh-pages
git checkout beta "builds/*<%= pkg.meta.suffix.beta %>.*" git pull
git merge --no-commit -s ours beta
git checkout beta "builds/*<%= pkg.meta.suffix.beta %>.*" LICENSE CHANGELOG.md img .gitignore .gitattributes
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to beta channel." git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to beta channel."
git checkout - git checkout -
""".split('\n').join('&&') """.split('\n').join('&&')
stable: stable:
command: """ command: """
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
git checkout -b tmp
git merge --no-commit -s ours gh-pages
git checkout gh-pages "builds/*<%= pkg.meta.suffix.beta %>.*" README.md template.jst index.html img
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel."
git checkout gh-pages git checkout gh-pages
git merge --ff-only tmp git pull
git branch -d tmp git merge --no-commit -s ours stable
git checkout @{-2} git checkout stable builds
git checkout HEAD "builds/*<%= pkg.meta.suffix.beta %>.*"
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel."
git checkout -
""".split('\n').join('&&') """.split('\n').join('&&')
web: web:
command: """ command: """
git commit -am "Build web page." git commit -am "Build web page."
git checkout gh-pages git checkout gh-pages
git checkout - README.md template.jst index.html img git pull
git merge --no-commit -s ours -
git checkout - README.md index.html img
git commit -am "Update web page." git commit -am "Update web page."
git checkout - git checkout -
""".split('\n').join('&&') """.split('\n').join('&&')