grafana 263 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. commit 7c72705bc5418ddf7030b3b50e86b236bd07e1fc
  2. Author: Torkel Ödegaard <torkel.odegaard@gmail.com>
  3. Date: Thu Jan 1 15:28:28 2015 +0100
  4. more work on build process
  5. diff --git a/src/views/index.html b/src/views/index.html
  6. index 0cb3e2cd2..d1c5f896f 100644
  7. --- a/src/views/index.html
  8. +++ b/src/views/index.html
  9. @@ -16,8 +16,8 @@
  10. </script>
  11. <!-- build:js app/app.js -->
  12. - <script src="public/vendor/require/require.js"></script>
  13. - <script src="public/app/components/require.backend.js"></script>
  14. + <script src="/public/vendor/require/require.js"></script>
  15. + <script src="/public/app/components/require.backend.js"></script>
  16. <!-- endbuild -->
  17. <script>require(['app'], function (app) { app.boot(); })</script>
  18. @@ -25,7 +25,7 @@
  19. </head>
  20. <body ng-cloak ng-controller="GrafanaCtrl">
  21. - <link rel="stylesheet" href="/public/css/grafana.light.min.css" ng-if="grafana.style === 'light'">
  22. + <link rel="stylesheet" href="/css/grafana.light.min.css" ng-if="grafana.style === 'light'">
  23. <div class="pro-container" ng-class="{'pro-sidemenu-open': grafana.sidemenu}">
  24. diff --git a/tasks/build_task.js b/tasks/build_task.js
  25. index 47f460537..e605a54a8 100644
  26. --- a/tasks/build_task.js
  27. +++ b/tasks/build_task.js
  28. @@ -23,6 +23,34 @@ module.exports = function(grunt) {
  29. //'uglify:dest'
  30. ]);
  31. + grunt.registerTask('build-post-process', function() {
  32. + var mode = grunt.config.get('mode');
  33. + if (mode === 'backend') {
  34. + grunt.config('copy.dist_to_tmp', {
  35. + expand: true,
  36. + cwd: '<%= destDir %>',
  37. + src: '**/*',
  38. + dest: '<%= tempDir %>/public/',
  39. + });
  40. + grunt.config('copy.backend_bin', {
  41. + cwd: '../bin',
  42. + expand: true,
  43. + src: ['grafana'],
  44. + options: { mode: true},
  45. + dest: '<%= tempDir %>'
  46. + });
  47. + grunt.config('copy.backend_conf', {
  48. + cwd: '../',
  49. + expand: true,
  50. + src: ['conf/*', '!conf/grafana.dev.ini'],
  51. + dest: '<%= tempDir %>'
  52. + });
  53. + grunt.task.run('copy:dist_to_tmp');
  54. + grunt.task.run('copy:backend_bin');
  55. + grunt.task.run('copy:backend_conf');
  56. + }
  57. + });
  58. +
  59. grunt.registerTask('build:grafanaVersion', function() {
  60. grunt.config('string-replace.config', {
  61. files: {
  62. diff --git a/tasks/distribute_task.js b/tasks/distribute_task.js
  63. index 7cff5efb8..56b76a4c7 100644
  64. --- a/tasks/distribute_task.js
  65. +++ b/tasks/distribute_task.js
  66. @@ -1,31 +1,11 @@
  67. module.exports = function(grunt) {
  68. -
  69. - // build, then zip and upload to s3
  70. - grunt.registerTask('distribute', [
  71. - 'distribute:load_s3_config',
  72. - 'build',
  73. - 'compress:zip',
  74. - 'compress:tgz',
  75. - 's3:dist',
  76. - 'clean:temp'
  77. - ]);
  78. + "use strict";
  79. // build, then zip and upload to s3
  80. grunt.registerTask('release', [
  81. - // 'distribute:load_s3_config',
  82. 'build',
  83. 'compress:zip_release',
  84. 'compress:tgz_release',
  85. - //'s3:release',
  86. - //'clean:temp'
  87. ]);
  88. - // collect the key and secret from the .aws-config.json file, finish configuring the s3 task
  89. - grunt.registerTask('distribute:load_s3_config', function () {
  90. - var config = grunt.file.readJSON('.aws-config.json');
  91. - grunt.config('s3.options', {
  92. - key: config.key,
  93. - secret: config.secret
  94. - });
  95. - });
  96. -}
  97. \ No newline at end of file
  98. +};