Commit 61e24884 authored by Tristan Read's avatar Tristan Read Committed by Mike Greiling

Include date, commit sha in output

Make fields easier to grep.
parent 4c7be075
......@@ -84,3 +84,4 @@ jsdoc/
.overcommit.yml
.projections.json
/qa/.rakeTasks
webpack-dev-server.json
......@@ -245,5 +245,9 @@ webpack-dev-server:
variables:
WEBPACK_MEMORY_TEST: "true"
script:
- node --version
- node --expose-gc node_modules/.bin/webpack-dev-server --config config/webpack.config.js
artifacts:
name: webpack-dev-server
expire_in: 31d
paths:
- webpack-dev-server.json
const path = require('path');
const glob = require('glob');
const fs = require('fs');
const webpack = require('webpack');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
......@@ -23,6 +24,7 @@ const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS;
const VUE_VERSION = require('vue/package.json').version;
const VUE_LOADER_VERSION = require('vue-loader/package.json').version;
const WEBPACK_VERSION = require('webpack/package.json').version;
const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map';
......@@ -359,6 +361,21 @@ module.exports = {
console.log(`Webpack heap size: ${toMB(memoryUsage)} MB`);
const webpackStatistics = {
memoryUsage,
date: Date.now(), // milliseconds
commitSHA: process.env.CI_COMMIT_SHA,
nodeVersion: process.versions.node,
webpackVersion: WEBPACK_VERSION,
};
console.log(webpackStatistics);
fs.writeFileSync(
path.join(ROOT_PATH, 'webpack-dev-server.json'),
JSON.stringify(webpackStatistics),
);
// exit in case we're running webpack-dev-server
IS_DEV_SERVER && process.exit();
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment