Skip to content

Commit

Permalink
Added deploy:assets Grunt task.
Browse files Browse the repository at this point in the history
Part of #68.
  • Loading branch information
stevenbenner committed Apr 3, 2013
1 parent 55056a8 commit 721e337
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@ module.exports = function(grunt) {
index: {
src: [ '<%= buildpath %>/index.md' ],
dest: 'index.md'
},
zipassets: {
src: [ '<%= buildpath %>/<%= files.zip %>' ],
dest: 'releases/<%= files.zip %>'
},
jsassets: {
src: [ '<%= buildpath %>/<%= files.cat %>' ],
dest: 'scripts/<%= files.cat %>'
},
cssassets: {
files: [
{
expand: true,
cwd: '<%= buildpath %>/css/',
src: [ '*.css', '!*.min.css' ],
dest: 'styles/'
}
]
}
},
csslint: {
Expand Down Expand Up @@ -166,6 +184,14 @@ module.exports = function(grunt) {
'git commit -m "Publishing docs."'
].join(' && ')
},
addassets: {
command: [
'git add releases/<%= files.zip %>',
'git add scripts/<%= files.cat %>',
'git add styles/jquery.powertip*.css',
'git commit -m "Publishing assets."'
].join(' && ')
},
checkoutmaster: {
command: 'git checkout master'
}
Expand Down Expand Up @@ -229,5 +255,6 @@ module.exports = function(grunt) {
grunt.registerTask('build:release', [ 'clean:dist', 'build', 'compress' ]);
grunt.registerTask('travis', [ 'concat:core', 'indent', 'concat:dist', 'clean:temp', 'jshint', 'qunit', 'csslint' ]);
grunt.registerTask('deploy:docs', [ 'build:gh-pages', 'shell:checkoutpages', 'copy:index', 'shell:addindex', 'shell:checkoutmaster' ]);
grunt.registerTask('deploy:assets', [ 'build:release', 'shell:checkoutpages', 'copy:zipassets', 'copy:jsassets', 'copy:cssassets', 'shell:addassets', 'shell:checkoutmaster' ]);

};

0 comments on commit 721e337

Please sign in to comment.