Merge branch 'master' of github.com:grafana/grafana

This commit is contained in:
Torkel Ödegaard 2014-06-14 11:39:44 +02:00
commit 6214872e0c
3 changed files with 13 additions and 26 deletions

View File

@ -3,7 +3,7 @@
*/ */
require.config({ require.config({
baseUrl: 'app', baseUrl: 'app',
// urlArgs: 'r=@REV@',
paths: { paths: {
config: ['../config', '../config.sample'], config: ['../config', '../config.sample'],
settings: 'components/settings', settings: 'components/settings',

View File

@ -90,7 +90,7 @@
"notice": false "notice": false
} }
], ],
"editable": false, "editable": true,
"failover": false, "failover": false,
"panel_hints": true, "panel_hints": true,
"style": "dark", "style": "dark",

View File

@ -11,40 +11,27 @@ module.exports = function(grunt) {
'htmlmin:build', 'htmlmin:build',
'ngtemplates', 'ngtemplates',
'cssmin:build', 'cssmin:build',
'build:grafanaVersion',
'ngmin:build', 'ngmin:build',
'requirejs:build', 'requirejs:build',
'concat:js', 'concat:js',
'filerev', 'filerev',
'usemin', 'usemin',
'clean:temp', 'clean:temp',
'build:write_revision',
'uglify:dest' 'uglify:dest'
]); ]);
// run a string replacement on the require config, using the latest revision number as the cache buster
grunt.registerTask('build:write_revision', function() {
grunt.event.once('git-describe', function (desc) {
grunt.registerTask('build:grafanaVersion', function() {
grunt.config('string-replace.config', { grunt.config('string-replace.config', {
files: { files: {
'<%= destDir %>/app/components/require.config.js': '<%= destDir %>/app/components/require.config.js', '<%= tempDir %>/app/app.js': '<%= tempDir %>/app/app.js'
'<%= destDir %>/app/app.js': '<%= destDir %>/app/app.js'
}, },
options: { options: {
replacements: [ replacements: [{ pattern: /@grafanaVersion@/g, replacement: '<%= pkg.version %>' }]
{
pattern: /@REV@/g,
replacement: desc.object
},
{
pattern: /@grafanaVersion@/g,
replacement: '<%= pkg.version %>'
}
]
} }
}); });
grunt.task.run('string-replace:config'); grunt.task.run('string-replace:config');
}); });
grunt.task.run('git-describe');
});
}; };