Add tag in release filename

This commit is contained in:
Pierre Rudloff 2016-04-29 21:34:57 +02:00
parent 2ddca6a743
commit 3c4d52e676
3 changed files with 11 additions and 4 deletions

2
.gitignore vendored
View file

@ -6,7 +6,7 @@ vendor/
templates_c/
ffmpeg.tar.xz
ffmpeg-*/
alltube-release.zip
alltube-*.zip
coverage/
bower_components/
config.yml

View file

@ -3,6 +3,11 @@ module.exports = function (grunt) {
'use strict';
grunt.initConfig(
{
githash: {
main: {
options: {}
}
},
uglify: {
combine: {
files: {
@ -52,7 +57,7 @@ module.exports = function (grunt) {
compress: {
release: {
options: {
archive: 'alltube-release.zip'
archive: 'alltube-<%= githash.main.tag %>.zip'
},
src: ['*.php', '!config.yml', 'dist/**', 'fonts/**', '.htaccess', 'img/**', 'js/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg']
}
@ -60,6 +65,7 @@ module.exports = function (grunt) {
}
);
grunt.loadNpmTasks('grunt-githash');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
@ -70,5 +76,5 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['uglify', 'cssmin']);
grunt.registerTask('lint', ['phpcs']);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('release', ['default', 'compress']);
grunt.registerTask('release', ['default', 'githash', 'compress']);
};

View file

@ -11,7 +11,8 @@
"grunt-phpcs": "~0.4.0",
"grunt-phpunit": "~0.3.6",
"grunt-contrib-compress": "~1.2.0",
"bower": "~1.7.1"
"bower": "~1.7.1",
"grunt-githash": "~0.1.3"
},
"repository": {
"type": "git",