Merge pull request #1606 from nasa/headers-1541

[Build] Remove/reorganize version headers
This commit is contained in:
Pete Richards 2017-06-19 18:22:17 -07:00 committed by GitHub
commit ecdcebce0c
3 changed files with 9 additions and 18 deletions

View File

@ -78,22 +78,14 @@ gulp.task('scripts', function () {
var requirejsOptimize = require('gulp-requirejs-optimize');
var replace = require('gulp-replace-task');
var header = require('gulp-header');
var comment = [
'/**',
' * Open MCT https://nasa.github.io/openmct/',
' * Version: ${pkg.version}',
' * Built: ${pkg.timestamp}',
' * Revision: ${pkg.revision}',
' * Branch: ${pkg.branch}',
'*/\n'
].join('\n');
var comment = fs.readFileSync('src/about.frag');
return gulp.src(paths.main)
.pipe(sourcemaps.init())
.pipe(requirejsOptimize(options.requirejsOptimize))
.pipe(sourcemaps.write('.'))
.pipe(replace(options.replace))
.pipe(header(comment, { pkg: options.replace.variables}))
.pipe(header(comment, options.replace.variables))
.pipe(gulp.dest(paths.dist));
});

7
src/about.frag Normal file
View File

@ -0,0 +1,7 @@
/**
* Open MCT https://nasa.github.io/openmct/
* Version: ${version}
* Built: ${timestamp}
* Revision: ${revision}
* Branch: ${branch}
*/

View File

@ -20,14 +20,6 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
/**
* Open MCT https://nasa.github.io/openmct/
* Version @@version
* Built @@timestamp
* Revision @@revision
* Branch @@branch
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);