diff --git a/package.json b/package.json
index 7e9e4c1fe8..0b16c94dff 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,6 @@
"@tallyho/tally-ui": "0.0.1",
"@tallyho/window-provider": "0.0.1",
"buffer": "^6.0.3",
- "git-revision-webpack-plugin": "^5.0.0",
"react": "^17.0.2",
"webext-options-sync": "^2.0.1",
"webextension-polyfill": "^0.7.0"
diff --git a/ui/pages/Menu.tsx b/ui/pages/Menu.tsx
index 056ac8249e..028379221e 100644
--- a/ui/pages/Menu.tsx
+++ b/ui/pages/Menu.tsx
@@ -102,11 +102,7 @@ export default function Menu(): ReactElement {
Give feedback!
- Version: {process.env.VERSION ?? ``} (
- {new Date(
- process.env.GIT_COMMIT_DATE ?? "invalid date"
- ).toLocaleDateString(undefined, { dateStyle: "medium" })}
- )
+ Version: {process.env.VERSION ?? ``}
diff --git a/webpack.config.ts b/webpack.config.ts
index 2798abc228..9b761e2da9 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -1,4 +1,3 @@
-/* eslint-disable no-console */
import path from "path"
import webpack, {
Configuration,
@@ -13,29 +12,10 @@ import TerserPlugin from "terser-webpack-plugin"
import LiveReloadPlugin from "webpack-livereload-plugin"
import CopyPlugin, { ObjectPattern } from "copy-webpack-plugin"
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin"
-import { GitRevisionPlugin } from "git-revision-webpack-plugin"
import WebExtensionArchivePlugin from "./build-utils/web-extension-archive-webpack-plugin"
const supportedBrowsers = ["brave", "chrome", "edge", "firefox", "opera"]
-const gitRevisionPlugin = new GitRevisionPlugin({
- /* `--tags` option allows for un-annotated tags, currently present in the repo */
- versionCommand: `describe --tags`,
-})
-
-const gitVersion = gitRevisionPlugin.version()
-if (gitVersion === null || !gitVersion.startsWith("v")) {
- throw new Error(`cannot get current version from git: missing or invalid`)
-}
-
-const [manifestVersion, versionQualifier] = gitVersion
- .substring(1)
- .split("-", 2)
-
-if (typeof versionQualifier !== "undefined") {
- console.log(`Building NON-OFFICIAL version ${gitVersion}. Do not release.`)
-}
-
// Replicated and adjusted for each target browser and the current build mode.
const baseConfig: Configuration = {
devtool: "source-map",
@@ -112,16 +92,8 @@ const baseConfig: Configuration = {
// FIXME version refed in @types/copy-webpack-plugin and our local
// FIXME webpack version.
}) as unknown as WebpackPluginInstance,
- gitRevisionPlugin,
new DefinePlugin({
- "process.env.GIT_COMMIT_HASH": JSON.stringify(
- gitRevisionPlugin.commithash()
- ),
- "process.env.GIT_COMMIT_DATE": JSON.stringify(
- gitRevisionPlugin.lastcommitdatetime()
- ),
- "process.env.GIT_BRANCH": JSON.stringify(gitRevisionPlugin.branch()),
- "process.env.VERSION": JSON.stringify(gitRevisionPlugin.version()),
+ "process.env.VERSION": JSON.stringify(process.env.npm_package_version),
}),
],
optimization: {
@@ -235,12 +207,6 @@ export default (
.map((assetData) => JSON.parse(assetData))
)
- if (combinedManifest.version !== manifestVersion) {
- throw new Error(
- `manifest version '${combinedManifest.version}' does not match git version '${manifestVersion}'`
- )
- }
-
return JSON.stringify(combinedManifest, null, 2)
},
} as unknown as ObjectPattern, // ObjectPattern doesn't include transformAll in current types
diff --git a/yarn.lock b/yarn.lock
index 6e3c125688..8662bb8ea9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6061,11 +6061,6 @@ getport@^0.1.0:
resolved "https://registry.yarnpkg.com/getport/-/getport-0.1.0.tgz#abddf3d5d1e77dd967ccfa2b036a0a1fb26fd7f7"
integrity sha1-q93z1dHnfdlnzPorA2oKH7Jv1/c=
-git-revision-webpack-plugin@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/git-revision-webpack-plugin/-/git-revision-webpack-plugin-5.0.0.tgz#0683a6a110ece618499880431cd89e1eb597b536"
- integrity sha512-RptQN/4UKcEPkCBmRy8kLPo5i8MnF8+XfAgFYN9gbwmKLTLx4YHsQw726H+C5+sIGDixDkmGL3IxPA2gKo+u4w==
-
glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"