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 checkout gh-pages
|
||||||
git pull
|
git pull
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&')
|
||||||
beta:
|
'tag-beta':
|
||||||
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 %>."
|
||||||
cd ..
|
""".split('\n').join('&&')
|
||||||
cd "<%= pkg.meta.path %>.gh-pages"
|
beta:
|
||||||
git checkout gh-pages
|
command: """
|
||||||
git pull
|
|
||||||
git merge --no-commit -s ours beta
|
git merge --no-commit -s ours beta
|
||||||
git checkout beta "builds/*<%= pkg.meta.suffix.beta %>.*" LICENSE CHANGELOG.md img .gitignore .gitattributes
|
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."
|
||||||
cd ..
|
|
||||||
cd "<%= pkg.meta.path %>"
|
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&')
|
||||||
stable:
|
'tag-stable':
|
||||||
command: """
|
command: """
|
||||||
git push . HEAD:bstable
|
git push . HEAD:bstable
|
||||||
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
||||||
cd ..
|
""".split('\n').join('&&')
|
||||||
cd "<%= pkg.meta.path %>.gh-pages"
|
stable:
|
||||||
git checkout gh-pages
|
command: """
|
||||||
git pull
|
|
||||||
git merge --no-commit -s ours stable
|
git merge --no-commit -s ours stable
|
||||||
git checkout stable "builds/<%= pkg.name %>.*" builds/updates.xml
|
git checkout stable "builds/<%= pkg.name %>.*" builds/updates.xml
|
||||||
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel."
|
git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel."
|
||||||
cd ..
|
|
||||||
cd "<%= pkg.meta.path %>"
|
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&')
|
||||||
'commit-web':
|
'commit-web':
|
||||||
command: 'git commit -am "Build web page."'
|
command: 'git commit -am "Build web page."'
|
||||||
web:
|
web:
|
||||||
command: """
|
command: """
|
||||||
cd ..
|
|
||||||
cd "<%= pkg.meta.path %>.gh-pages"
|
|
||||||
git checkout gh-pages
|
|
||||||
git pull
|
|
||||||
git merge --no-commit -s ours -
|
git merge --no-commit -s ours -
|
||||||
git checkout - README.md index.html web.css img
|
git checkout - README.md index.html web.css img
|
||||||
git commit -am "Update web page."
|
git commit -am "Update web page."
|
||||||
cd ..
|
|
||||||
cd "<%= pkg.meta.path %>"
|
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&')
|
||||||
push:
|
push:
|
||||||
command: 'git push origin --tags -f && git push origin --all'
|
command: 'git push origin --tags -f && git push origin --all'
|
||||||
aws:
|
aws:
|
||||||
command: """
|
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 "*.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 "*.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"
|
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 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 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"
|
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('&&')
|
""".split('\n').join('&&')
|
||||||
captchas:
|
captchas:
|
||||||
command: 'aws s3 cp captchas.html s3://<%= pkg.meta.awsBucket %> --cache-control "max-age=0" --content-type "text/html; charset=utf-8"'
|
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.file.setBase "../#{pkg.meta.path}"
|
||||||
|
|
||||||
grunt.registerTask 'beta', [
|
grunt.registerTask 'beta', [
|
||||||
|
'shell:tag-beta'
|
||||||
|
'pushd'
|
||||||
'shell:beta'
|
'shell:beta'
|
||||||
|
'popd'
|
||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'stable', [
|
grunt.registerTask 'stable', [
|
||||||
|
'shell:tag-stable'
|
||||||
|
'pushd'
|
||||||
'shell:stable'
|
'shell:stable'
|
||||||
|
'popd'
|
||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'web', 'Move website changes to gh-pages.', ->
|
grunt.registerTask 'web', 'Move website changes to gh-pages.', ->
|
||||||
@ -431,14 +420,20 @@ module.exports = (grunt) ->
|
|||||||
'copy:web'
|
'copy:web'
|
||||||
'shell:commit-web'
|
'shell:commit-web'
|
||||||
]
|
]
|
||||||
grunt.task.run 'shell:web'
|
grunt.task.run [
|
||||||
|
'pushd'
|
||||||
|
'shell:web'
|
||||||
|
'popd'
|
||||||
|
]
|
||||||
|
|
||||||
grunt.registerTask 'push', [
|
grunt.registerTask 'push', [
|
||||||
'shell:push'
|
'shell:push'
|
||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'aws', [
|
grunt.registerTask 'aws', [
|
||||||
|
'pushd'
|
||||||
'shell:aws'
|
'shell:aws'
|
||||||
|
'popd'
|
||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'store', [
|
grunt.registerTask 'store', [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user