Skip to content

Commit

Permalink
gruntfile modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
unfulvio committed Jul 14, 2015
1 parent bfab232 commit 90d9a1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
# NetBeans
nbproject/private/
build/
nbbuild/
dist/
nbdist/
Expand Down Expand Up @@ -43,5 +42,6 @@ ehthumbs.db
us.stackdump

### Builds ###
build/
svn/
release/
33 changes: 10 additions & 23 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,23 @@ module.exports = function( grunt ) {
pkg: pkg,

clean: {
main: [
// Clean directories before new build
'svn/trunk',
'release'
]
main: [ 'build' ]
},

// Copy the plugin to a svn versioned build directory
// Copy the plugin to build directory
copy: {
assets : {
expand: true,
src: 'assets/*.*',
dest: 'svn/assets/'
},
tag: {
expand: true,
src: distFiles,
dest: 'svn/tags/' + pkg.version + '/'
},
trunk: {
main: {
expand: true,
src: distFiles,
dest: 'svn/trunk'
dest: 'build/wp-php-console'
}
},

compress: {
main: {
options: {
mode: 'zip',
archive: './release/wp-php-console.<%= pkg.version %>.zip'
archive: './build/wp-php-console.<%= pkg.version %>.zip'
},
expand: true,
src: distFiles,
Expand All @@ -66,11 +52,12 @@ module.exports = function( grunt ) {
deploy: {
options: {
plugin_slug: 'wp-php-console',
build_dir: 'svn/trunk',
assets_dir: 'svn/assets'
build_dir: 'build/wp-php-console',
assets_dir: 'assets',
svn_url: 'https://plugins.svn.wordpress.org/wp-php-console'
}
}
},
}

} );

Expand All @@ -79,7 +66,7 @@ module.exports = function( grunt ) {

// Register tasks

grunt.registerTask( 'release', ['clean', 'copy:assets', 'copy:trunk', 'copy:tag', 'compress'] );
grunt.registerTask( 'release', ['clean', 'copy', 'compress'] );

grunt.registerTask( 'deploy', ['release', 'wp_deploy'] );

Expand Down

0 comments on commit 90d9a1d

Please sign in to comment.