From cd97433a4ee693a6cd9e1226399627537a6968c3 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 29 Oct 2015 23:21:12 +0100 Subject: [PATCH] Move release script to Grunt (fixes #31) --- Gruntfile.js | 10 ++++++++++ package.json | 3 ++- release.sh | 2 -- 3 files changed, 12 insertions(+), 3 deletions(-) delete mode 100755 release.sh diff --git a/Gruntfile.js b/Gruntfile.js index bfa43c3..3fba1ac 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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']); }; diff --git a/package.json b/package.json index af3b7d6..cdb4e6e 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/release.sh b/release.sh deleted file mode 100755 index 2f34b6e..0000000 --- a/release.sh +++ /dev/null @@ -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/*