Explorar o código

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

Torkel Ödegaard %!s(int64=11) %!d(string=hai) anos
pai
achega
6214872e0c
Modificáronse 3 ficheiros con 13 adicións e 26 borrados
  1. 1 1
      src/app/components/require.config.js
  2. 1 1
      src/app/dashboards/default.json
  3. 11 24
      tasks/build_task.js

+ 1 - 1
src/app/components/require.config.js

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

+ 1 - 1
src/app/dashboards/default.json

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

+ 11 - 24
tasks/build_task.js

@@ -11,40 +11,27 @@ module.exports = function(grunt) {
     'htmlmin:build',
     'ngtemplates',
     'cssmin:build',
+    'build:grafanaVersion',
     'ngmin:build',
     'requirejs:build',
     'concat:js',
     'filerev',
     'usemin',
     'clean:temp',
-    'build:write_revision',
     '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.config('string-replace.config', {
-        files: {
-          '<%= destDir %>/app/components/require.config.js': '<%= destDir %>/app/components/require.config.js',
-          '<%= destDir %>/app/app.js': '<%= destDir %>/app/app.js'
-        },
-        options: {
-          replacements: [
-            {
-              pattern: /@REV@/g,
-              replacement: desc.object
-            },
-            {
-              pattern: /@grafanaVersion@/g,
-              replacement: '<%= pkg.version %>'
-            }
-          ]
-        }
-      });
-      grunt.task.run('string-replace:config');
+  grunt.registerTask('build:grafanaVersion', function() {
+    grunt.config('string-replace.config', {
+      files: {
+        '<%= tempDir %>/app/app.js': '<%= tempDir %>/app/app.js'
+      },
+      options: {
+        replacements: [{ pattern: /@grafanaVersion@/g,  replacement: '<%= pkg.version %>' }]
+      }
     });
-    grunt.task.run('git-describe');
+    grunt.task.run('string-replace:config');
   });
+
 };