Move release script to Grunt (fixes #31)

This commit is contained in:
Pierre Rudloff 2015-10-29 23:21:12 +01:00
parent 22cffe4a90
commit cd97433a4e
3 changed files with 12 additions and 3 deletions

View File

@ -45,6 +45,14 @@ module.exports = function (grunt) {
classes: {
dir: 'tests/'
}
},
compress: {
release: {
options: {
archive: 'alltube-release.zip'
},
src: ['*.php', '!config.php', 'dist/**', 'fonts/**', '.htaccess', 'img/**', 'js/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**']
}
}
}
);
@ -54,8 +62,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-phpcs');
grunt.loadNpmTasks('grunt-phpunit');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', ['uglify', 'cssmin']);
grunt.registerTask('lint', ['phpcs']);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('release', ['compress']);
};

View File

@ -8,7 +8,8 @@
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-phpcs": "~0.4.0",
"grunt-phpunit": "~0.3.6"
"grunt-phpunit": "~0.3.6",
"grunt-contrib-compress": "~0.13.0"
},
"engines": {
"node": "~0.10.29"

View File

@ -1,2 +0,0 @@
rm alltube-release.zip
zip -r alltube-release.zip *.php dist/ fonts/ .htaccess img/ js/ LICENSE README.md robots.txt sitemap.xml templates/ templates_c/ vendor/ youtube-dl -x config.php templates_c/*