web: We no longer need git dependency in webpack builds - fixes #1517
This commit is contained in:
parent
cc81122fd8
commit
600d267bf3
|
@ -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: [
|
||||
{
|
||||
|
|
|
@ -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" }],
|
||||
}),
|
||||
|
|
|
@ -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" }],
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue