Skip to content

Commit b215789

Browse files
Akshay UrankarAkshay Urankar
authored andcommitted
added release command for AIOSRS
1 parent d2015eb commit b215789

File tree

3 files changed

+170
-53
lines changed

3 files changed

+170
-53
lines changed

Gruntfile.js

Lines changed: 62 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,64 @@
1-
module.exports = function( grunt ) {
2-
3-
'use strict';
4-
5-
// Project configuration
6-
grunt.initConfig( {
7-
8-
pkg: grunt.file.readJSON( 'package.json' ),
9-
10-
addtextdomain: {
11-
options: {
12-
textdomain: 'all-in-one-schemaorg-rich-snippets',
13-
},
14-
update_all_domains: {
15-
options: {
16-
updateDomains: true
17-
},
18-
src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ]
19-
}
20-
},
21-
22-
wp_readme_to_markdown: {
23-
your_target: {
24-
files: {
25-
'README.md': 'readme.txt'
26-
}
27-
},
28-
},
29-
30-
makepot: {
31-
target: {
32-
options: {
33-
domainPath: '/languages',
34-
exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ],
35-
mainFile: 'index.php',
36-
potFilename: 'all-in-one-schemaorg-rich-snippets.pot',
37-
potHeaders: {
38-
poedit: true,
39-
'x-poedit-keywordslist': true
40-
},
41-
type: 'wp-plugin',
42-
updateTimestamp: true
43-
}
44-
}
45-
},
46-
} );
47-
48-
grunt.loadNpmTasks( 'grunt-wp-i18n' );
49-
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
50-
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
51-
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] );
52-
53-
grunt.util.linefeed = '\n';
1+
module.exports = function(grunt) {
542

3+
'use strict';
4+
5+
// Project configuration
6+
grunt.initConfig({
7+
8+
pkg: grunt.file.readJSON('package.json'),
9+
10+
addtextdomain: {
11+
options: {
12+
textdomain: 'all-in-one-schemaorg-rich-snippets',
13+
},
14+
update_all_domains: {
15+
options: {
16+
updateDomains: true
17+
},
18+
src: ['*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*']
19+
}
20+
},
21+
22+
wp_readme_to_markdown: {
23+
your_target: {
24+
files: {
25+
'README.md': 'readme.txt'
26+
}
27+
},
28+
},
29+
30+
makepot: {
31+
target: {
32+
options: {
33+
domainPath: '/languages',
34+
exclude: ['\.git/*', 'bin/*', 'node_modules/*', 'tests/*'],
35+
mainFile: 'index.php',
36+
potFilename: 'all-in-one-schemaorg-rich-snippets.pot',
37+
potHeaders: {
38+
poedit: true,
39+
'x-poedit-keywordslist': true
40+
},
41+
type: 'wp-plugin',
42+
updateTimestamp: true
43+
}
44+
}
45+
},
46+
47+
zip: {
48+
'release': {
49+
src: ['**/*', '!node_modules/**', '!tests/**', '!bin/**', '!**/*.zip'], // Exclude certain folders and existing zip files
50+
dest: 'all-in-one-schemaorg-rich-snippets.zip'
51+
}
52+
},
53+
});
54+
55+
grunt.loadNpmTasks('grunt-wp-i18n');
56+
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
57+
grunt.loadNpmTasks('grunt-zip'); // Use grunt-zip instead
58+
59+
grunt.registerTask('i18n', ['addtextdomain', 'makepot']);
60+
grunt.registerTask('readme', ['wp_readme_to_markdown']);
61+
grunt.registerTask('release', ['zip:release']); // Add release command
62+
63+
grunt.util.linefeed = '\n';
5564
};

package-lock.json

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"grunt": "^1.6.1",
88
"grunt-wp-i18n": "^1.0.3",
99
"grunt-wp-readme-to-markdown": "~2.0.1",
10+
"grunt-zip": "^1.0.0",
1011
"js-yaml": ">=3.13.1",
1112
"minimist": ">=1.2.3"
1213
}

0 commit comments

Comments
 (0)