diff --git a/dashboard/src/index.html b/dashboard/src/index.html
index 543aefdb1..82f3b80cf 100644
--- a/dashboard/src/index.html
+++ b/dashboard/src/index.html
@@ -11,70 +11,70 @@
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/dashboard/src/js/index.js b/dashboard/src/js/index.js
index 0933ae4fd..a84046838 100644
--- a/dashboard/src/js/index.js
+++ b/dashboard/src/js/index.js
@@ -52,40 +52,40 @@ app.config(['$routeProvider', function ($routeProvider) {
redirectTo: '/apps'
}).when('/users', {
controller: 'UsersController',
- templateUrl: 'views/users.html'
+ templateUrl: 'views/users.html?<%= revision %>'
}).when('/appstore', {
controller: 'AppStoreController',
- templateUrl: 'views/appstore.html'
+ templateUrl: 'views/appstore.html?<%= revision %>'
}).when('/appstore/:appId', {
controller: 'AppStoreController',
- templateUrl: 'views/appstore.html'
+ templateUrl: 'views/appstore.html?<%= revision %>'
}).when('/apps', {
controller: 'AppsController',
- templateUrl: 'views/apps.html'
+ templateUrl: 'views/apps.html?<%= revision %>'
}).when('/account', {
controller: 'AccountController',
- templateUrl: 'views/account.html'
+ templateUrl: 'views/account.html?<%= revision %>'
}).when('/graphs', {
controller: 'GraphsController',
- templateUrl: 'views/graphs.html'
+ templateUrl: 'views/graphs.html?<%= revision %>'
}).when('/domains', {
controller: 'DomainsController',
- templateUrl: 'views/domains.html'
+ templateUrl: 'views/domains.html?<%= revision %>'
}).when('/email', {
controller: 'EmailController',
- templateUrl: 'views/email.html'
+ templateUrl: 'views/email.html?<%= revision %>'
}).when('/settings', {
controller: 'SettingsController',
- templateUrl: 'views/settings.html'
+ templateUrl: 'views/settings.html?<%= revision %>'
}).when('/activity', {
controller: 'ActivityController',
- templateUrl: 'views/activity.html'
+ templateUrl: 'views/activity.html?<%= revision %>'
}).when('/support', {
controller: 'SupportController',
- templateUrl: 'views/support.html'
+ templateUrl: 'views/support.html?<%= revision %>'
}).when('/tokens', {
controller: 'TokensController',
- templateUrl: 'views/tokens.html'
+ templateUrl: 'views/tokens.html?<%= revision %>'
}).otherwise({ redirectTo: '/'});
}]);
diff --git a/gulpfile.js b/gulpfile.js
index 53c043111..ec3519b08 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -44,6 +44,7 @@ if (argv.help || argv.h) {
console.log(' --client-id ');
console.log(' --client-secret ');
console.log(' --api-origin ');
+ console.log(' --revision ');
process.exit(1);
}
@@ -57,12 +58,15 @@ var oauth = {
apiOriginHostname: argv.apiOrigin ? url.parse(argv.apiOrigin).hostname : ''
};
+var revision = argv.revision || '';
+
console.log();
console.log('Using OAuth credentials:');
console.log(' ClientId: %s', oauth.clientId);
console.log(' ClientSecret: %s', oauth.clientSecret);
console.log(' Cloudron API: %s', oauth.apiOrigin || 'default');
console.log(' Cloudron Host: %s', oauth.apiOriginHostname);
+console.log(' Revision: %s', argv.revision);
console.log();
@@ -80,7 +84,7 @@ gulp.task('js-index', function () {
'dashboard/src/js/main.js',
'dashboard/src/views/*.js'
])
- .pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
+ .pipe(ejs({ oauth: oauth, revision: revision }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('index.js', { newLine: ';' }))
.pipe(uglifyer)
@@ -189,7 +193,7 @@ gulp.task('js-update', function () {
// --------------
gulp.task('html', ['html-views', 'html-templates'], function () {
- return gulp.src('dashboard/src/*.html').pipe(ejs({ apiOriginHostname: oauth.apiOriginHostname }, {}, { ext: '.html' })).pipe(gulp.dest('dashboard/dist'));
+ return gulp.src('dashboard/src/*.html').pipe(ejs({ apiOriginHostname: oauth.apiOriginHostname, revision: revision }, {}, { ext: '.html' })).pipe(gulp.dest('dashboard/dist'));
});
gulp.task('html-views', function () {