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/ templates_c/
ffmpeg.tar.xz ffmpeg.tar.xz
ffmpeg-*/ ffmpeg-*/
alltube-release.zip alltube-*.zip
coverage/ coverage/
bower_components/ bower_components/
config.yml config.yml

View file

@ -3,6 +3,11 @@ module.exports = function (grunt) {
'use strict'; 'use strict';
grunt.initConfig( grunt.initConfig(
{ {
githash: {
main: {
options: {}
}
},
uglify: { uglify: {
combine: { combine: {
files: { files: {
@ -52,7 +57,7 @@ module.exports = function (grunt) {
compress: { compress: {
release: { release: {
options: { 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'] 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-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-watch');
@ -70,5 +76,5 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['uglify', 'cssmin']); grunt.registerTask('default', ['uglify', 'cssmin']);
grunt.registerTask('lint', ['phpcs']); grunt.registerTask('lint', ['phpcs']);
grunt.registerTask('test', ['phpunit']); 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-phpcs": "~0.4.0",
"grunt-phpunit": "~0.3.6", "grunt-phpunit": "~0.3.6",
"grunt-contrib-compress": "~1.2.0", "grunt-contrib-compress": "~1.2.0",
"bower": "~1.7.1" "bower": "~1.7.1",
"grunt-githash": "~0.1.3"
}, },
"repository": { "repository": {
"type": "git", "type": "git",