Browse Source

fixed string replace issue that caused problems, this removes build cache busting in requirejs, will need to fix that later

Torkel Ödegaard 11 years ago
parent
commit
c22c4b864c
2 changed files with 3 additions and 7 deletions
  1. 1 1
      src/app/app.js
  2. 2 6
      tasks/build_task.js

+ 1 - 1
src/app/app.js

@@ -26,7 +26,7 @@ function (angular, $, _, appLevelRequire) {
     // features if we define them after boot time
     // features if we define them after boot time
     register_fns = {};
     register_fns = {};
 
 
-  // // This stores the Kibana revision number, @REV@ is replaced by grunt.
+  // This stores the grafana version number
   app.constant('grafanaVersion',"@grafanaVersion@");
   app.constant('grafanaVersion',"@grafanaVersion@");
 
 
   // Use this for cache busting partials
   // Use this for cache busting partials

+ 2 - 6
tasks/build_task.js

@@ -26,15 +26,11 @@ module.exports = function(grunt) {
         options: {
         options: {
           replacements: [
           replacements: [
             {
             {
-              pattern: /(?:^|\/\/)(.*)@REV@/,
-              replacement: '$1'+desc.object
-            },
-            {
-              pattern: /@REV@/,
+              pattern: /@REV@/g,
               replacement: desc.object
               replacement: desc.object
             },
             },
             {
             {
-              pattern: /@grafanaVersion@/,
+              pattern: /@grafanaVersion@/g,
               replacement: 'v<%= pkg.version %>'
               replacement: 'v<%= pkg.version %>'
             }
             }
           ]
           ]