Remove repetition from distribution branch tasks.
This commit is contained in:
parent
a5f3079e22
commit
05039dcb5a
@ -139,54 +139,39 @@ module.exports = (grunt) ->
|
||||
git checkout gh-pages
|
||||
git pull
|
||||
""".split('\n').join('&&')
|
||||
beta:
|
||||
'tag-beta':
|
||||
command: """
|
||||
git tag -af beta -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>.gh-pages"
|
||||
git checkout gh-pages
|
||||
git pull
|
||||
""".split('\n').join('&&')
|
||||
beta:
|
||||
command: """
|
||||
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."
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>"
|
||||
""".split('\n').join('&&')
|
||||
stable:
|
||||
'tag-stable':
|
||||
command: """
|
||||
git push . HEAD:bstable
|
||||
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>.gh-pages"
|
||||
git checkout gh-pages
|
||||
git pull
|
||||
""".split('\n').join('&&')
|
||||
stable:
|
||||
command: """
|
||||
git merge --no-commit -s ours stable
|
||||
git checkout stable "builds/<%= pkg.name %>.*" builds/updates.xml
|
||||
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel."
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>"
|
||||
""".split('\n').join('&&')
|
||||
'commit-web':
|
||||
command: 'git commit -am "Build web page."'
|
||||
web:
|
||||
command: """
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>.gh-pages"
|
||||
git checkout gh-pages
|
||||
git pull
|
||||
git merge --no-commit -s ours -
|
||||
git checkout - README.md index.html web.css img
|
||||
git commit -am "Update web page."
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>"
|
||||
""".split('\n').join('&&')
|
||||
push:
|
||||
command: 'git push origin --tags -f && git push origin --all'
|
||||
aws:
|
||||
command: """
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>.gh-pages"
|
||||
git checkout gh-pages
|
||||
aws s3 cp builds/ s3://<%= pkg.meta.awsBucket %>/builds/ --recursive --exclude "*" --include "*.js" --cache-control "max-age=600" --content-type "application/javascript; charset=utf-8"
|
||||
aws s3 cp builds/ s3://<%= pkg.meta.awsBucket %>/builds/ --recursive --exclude "*" --include "*.crx" --cache-control "max-age=600" --content-type "application/x-chrome-extension"
|
||||
aws s3 cp builds/ s3://<%= pkg.meta.awsBucket %>/builds/ --recursive --exclude "*" --include "*.xml" --cache-control "max-age=600" --content-type "text/xml; charset=utf-8"
|
||||
@ -194,8 +179,6 @@ module.exports = (grunt) ->
|
||||
aws s3 cp img/ s3://<%= pkg.meta.awsBucket %>/img/ --recursive --cache-control "max-age=600"
|
||||
aws s3 cp index.html s3://<%= pkg.meta.awsBucket %> --cache-control "max-age=600" --content-type "text/html; charset=utf-8"
|
||||
aws s3 cp web.css s3://<%= pkg.meta.awsBucket %> --cache-control "max-age=600" --content-type "text/css; charset=utf-8"
|
||||
cd ..
|
||||
cd "<%= pkg.meta.path %>"
|
||||
""".split('\n').join('&&')
|
||||
captchas:
|
||||
command: 'aws s3 cp captchas.html s3://<%= pkg.meta.awsBucket %> --cache-control "max-age=0" --content-type "text/html; charset=utf-8"'
|
||||
@ -417,11 +400,17 @@ module.exports = (grunt) ->
|
||||
grunt.file.setBase "../#{pkg.meta.path}"
|
||||
|
||||
grunt.registerTask 'beta', [
|
||||
'shell:tag-beta'
|
||||
'pushd'
|
||||
'shell:beta'
|
||||
'popd'
|
||||
]
|
||||
|
||||
grunt.registerTask 'stable', [
|
||||
'shell:tag-stable'
|
||||
'pushd'
|
||||
'shell:stable'
|
||||
'popd'
|
||||
]
|
||||
|
||||
grunt.registerTask 'web', 'Move website changes to gh-pages.', ->
|
||||
@ -431,14 +420,20 @@ module.exports = (grunt) ->
|
||||
'copy:web'
|
||||
'shell:commit-web'
|
||||
]
|
||||
grunt.task.run 'shell:web'
|
||||
grunt.task.run [
|
||||
'pushd'
|
||||
'shell:web'
|
||||
'popd'
|
||||
]
|
||||
|
||||
grunt.registerTask 'push', [
|
||||
'shell:push'
|
||||
]
|
||||
|
||||
grunt.registerTask 'aws', [
|
||||
'pushd'
|
||||
'shell:aws'
|
||||
'popd'
|
||||
]
|
||||
|
||||
grunt.registerTask 'store', [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user