web: We no longer need git dependency in webpack builds - fixes #1517

This commit is contained in:
Nathan Adams 2020-11-20 16:20:57 +01:00 committed by Mike Welsh
parent cc81122fd8
commit 600d267bf3
3 changed files with 0 additions and 48 deletions

View File

@ -2,7 +2,6 @@
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
const path = require("path");
module.exports = (env, argv) => {
@ -11,16 +10,6 @@ module.exports = (env, argv) => {
mode = argv.mode;
}
const commitHash = require("child_process")
.execSync("git rev-parse --short HEAD")
.toString();
const commitDate = require("child_process")
.execSync("git log -1 --date=short --pretty=format:%cd")
.toString();
const channel = process.env.CFG_RELEASE_CHANNEL || "nightly".toLowerCase();
console.log(`Building ${mode}...`);
return {
@ -37,11 +26,6 @@ module.exports = (env, argv) => {
devtool: "source-map",
plugins: [
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash),
__COMMIT_DATE__: JSON.stringify(commitDate),
__CHANNEL__: JSON.stringify(channel),
}),
new CopyWebpackPlugin({
patterns: [
{

View File

@ -2,7 +2,6 @@
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
const path = require("path");
module.exports = (env, argv) => {
@ -11,16 +10,6 @@ module.exports = (env, argv) => {
mode = argv.mode;
}
const commitHash = require("child_process")
.execSync("git rev-parse --short HEAD")
.toString();
const commitDate = require("child_process")
.execSync("git log -1 --date=short --pretty=format:%cd")
.toString();
const channel = process.env.CFG_RELEASE_CHANNEL || "nightly".toLowerCase();
console.log(`Building ${mode}...`);
return {
@ -42,11 +31,6 @@ module.exports = (env, argv) => {
},
plugins: [
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash),
__COMMIT_DATE__: JSON.stringify(commitDate),
__CHANNEL__: JSON.stringify(channel),
}),
new CopyPlugin({
patterns: [{ from: "LICENSE*" }, { from: "README.md" }],
}),

View File

@ -2,7 +2,6 @@
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
const path = require("path");
module.exports = (env, argv) => {
@ -11,16 +10,6 @@ module.exports = (env, argv) => {
mode = argv.mode;
}
const commitHash = require("child_process")
.execSync("git rev-parse --short HEAD")
.toString();
const commitDate = require("child_process")
.execSync("git log -1 --date=short --pretty=format:%cd")
.toString();
const channel = process.env.CFG_RELEASE_CHANNEL || "nightly".toLowerCase();
console.log(`Building ${mode}...`);
return {
@ -38,11 +27,6 @@ module.exports = (env, argv) => {
devtool: "source-map",
plugins: [
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash),
__COMMIT_DATE__: JSON.stringify(commitDate),
__CHANNEL__: JSON.stringify(channel),
}),
new CopyPlugin({
patterns: [{ from: "LICENSE*" }, { from: "README.md" }],
}),