This repository has been archived by the owner on Jul 24, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46e3376
commit d9cc19e
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
module.exports = function(grunt) { | ||
"use strict"; | ||
|
||
grunt.initConfig({ | ||
|
||
// gets the package vars | ||
pkg: grunt.file.readJSON("package.json"), | ||
svn_settings: { | ||
path: "../../../../wp_plugins/<%= pkg.name %>", | ||
tag: "<%= svn_settings.path %>/tags/<%= pkg.version %>", | ||
trunk: "<%= svn_settings.path %>/trunk", | ||
exclude: [ | ||
".editorconfig", | ||
".git/", | ||
".gitignore", | ||
"node_modules/", | ||
"Gruntfile.js", | ||
"README.md", | ||
"package.json", | ||
"*.zip" | ||
] | ||
}, | ||
|
||
// image optimization | ||
imagemin: { | ||
dist: { | ||
options: { | ||
optimizationLevel: 7, | ||
progressive: true | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: "./", | ||
src: ["screenshot-*.png"], | ||
dest: "./" | ||
}] | ||
} | ||
}, | ||
|
||
// rsync commands used to take the files to svn repository | ||
rsync: { | ||
tag: { | ||
src: "./", | ||
dest: "<%= svn_settings.tag %>", | ||
recursive: true, | ||
exclude: "<%= svn_settings.exclude %>" | ||
}, | ||
trunk: { | ||
src: "./", | ||
dest: "<%= svn_settings.trunk %>", | ||
recursive: true, | ||
exclude: "<%= svn_settings.exclude %>" | ||
} | ||
}, | ||
|
||
// shell command to commit the new version of the plugin | ||
shell: { | ||
svn_add: { | ||
command: 'svn add --force * --auto-props --parents --depth infinity -q', | ||
options: { | ||
stdout: true, | ||
stderr: true, | ||
execOptions: { | ||
cwd: "<%= svn_settings.path %>" | ||
} | ||
} | ||
}, | ||
svn_commit: { | ||
command: "svn commit -m 'updated the plugin version to <%= pkg.version %>'", | ||
options: { | ||
stdout: true, | ||
stderr: true, | ||
execOptions: { | ||
cwd: "<%= svn_settings.path %>" | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
// load tasks | ||
grunt.loadNpmTasks('grunt-contrib-imagemin'); | ||
grunt.loadNpmTasks("grunt-rsync"); | ||
grunt.loadNpmTasks("grunt-shell"); | ||
|
||
// default task | ||
grunt.registerTask("default", [ | ||
"rsync:tag", | ||
"rsync:trunk", | ||
"shell:svn_add", | ||
"shell:svn_commit" | ||
]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "woocommerce-boleto", | ||
"description": "WooCommerce Boleto is a brazilian payment gateway for WooCommerce", | ||
"version": "1.0.0", | ||
"main": "Gruntfile.js", | ||
"dependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-imagemin": "~0.2.1", | ||
"grunt-rsync": "~0.2.0", | ||
"grunt-shell": "~0.3.1" | ||
} | ||
} |