Skip to content

Commit

Permalink
updated build and release tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelo committed Jan 4, 2015
1 parent 55bc150 commit 5a3d3f5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ module.exports = function (grunt) {

config.mode = grunt.option('mode') || 'standalone';
config.modeOptions = {
zipSuffix: '',
requirejs: {
paths: { config: '../config.sample' },
excludeConfig: true,
}
};

if (config.mode === 'backend') {
grunt.log.writeln('Setting backend build mode');
config.modeOptions.zipSuffix = '-backend';
config.modeOptions.requirejs.path = { config: 'components/config' };
config.modeOptions.requirejs.excludeConfig = true;
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"company": "Coding Instinct AB"
},
"name": "grafana",
"version": "1.9.1",
"version": "2.0.0-alpha",
"repository": {
"type": "git",
"url": "http://github.com/torkelo/grafana.git"
Expand All @@ -16,7 +16,7 @@
"grunt-angular-templates": "^0.5.5",
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compress": "~0.5.2",
"grunt-contrib-compress": "~0.13.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.5.0",
Expand Down
3 changes: 3 additions & 0 deletions tasks/build_task.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = function(grunt) {
"use strict";

// Concat and Minify the src directory into dist
grunt.registerTask('build', [
Expand Down Expand Up @@ -32,6 +33,7 @@ module.exports = function(grunt) {
src: '**/*',
dest: '<%= tempDir %>/public/',
});
grunt.config('clean.dest_dir', ['<%= destDir %>']);
grunt.config('copy.backend_bin', {
cwd: '../bin',
expand: true,
Expand All @@ -46,6 +48,7 @@ module.exports = function(grunt) {
dest: '<%= tempDir %>'
});
grunt.task.run('copy:dist_to_tmp');
grunt.task.run('clean:dest_dir');
grunt.task.run('copy:backend_bin');
grunt.task.run('copy:backend_conf');
}
Expand Down
4 changes: 2 additions & 2 deletions tasks/options/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(config) {
},
zip_release: {
options: {
archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.zip'
archive: '<%= destDir %>/<%= pkg.name %><%= modeOptions.zipSuffix %>-<%= pkg.version %>.zip'
},
files : [
{
Expand All @@ -56,7 +56,7 @@ module.exports = function(config) {
},
tgz_release: {
options: {
archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz'
archive: '<%= destDir %>/<%= pkg.name %><%= modeOptions.zipSuffix %>-<%= pkg.version %>.tar.gz'
},
files : [
{
Expand Down

0 comments on commit 5a3d3f5

Please sign in to comment.