From ddae9dc6e150d153665a87a799b0efc9ec22c491 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 4 Jul 2022 21:10:16 +0200 Subject: [PATCH] Revert "web: manage version via package.json" This reverts commit 022401b60ef7926c81214c83a4e515d3ddeedd7d. Signed-off-by: Jens Langhammer # Conflicts: # web/src/api/Sentry.ts # web/src/api/Users.ts --- .bumpversion.cfg | 2 +- web/package.json | 4 ++-- web/rollup.config.js | 13 +++++-------- web/src/constants.ts | 4 +--- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0a2eb407b..8aef550c4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -17,4 +17,4 @@ tag_name = version/{new_version} [bumpversion:file:internal/constants/constants.go] -[bumpversion:file:web/package.json] +[bumpversion:file:web/src/constants.ts] diff --git a/web/package.json b/web/package.json index 3f5c0c7ca..cd7001ee5 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { - "name": "@goauthentik/web", - "version": "2022.6.3", + "name": "authentik-web", + "version": "0.0.0", "private": true, "license": "GNU GPLv3", "scripts": { diff --git a/web/rollup.config.js b/web/rollup.config.js index 970fb0f3e..8e4ff033f 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -7,8 +7,6 @@ import copy from "rollup-plugin-copy"; import cssimport from "rollup-plugin-cssimport"; import { terser } from "rollup-plugin-terser"; -import pkg from "./package.json"; - const extensions = [".js", ".jsx", ".ts", ".tsx"]; export const resources = [ @@ -75,12 +73,6 @@ export const defaultOptions = { plugins: [ cssimport(), markdown(), - replace({ - "process.env.NODE_ENV": JSON.stringify(isProdBuild ? "production" : "development"), - "process.env.AK_API_BASE_PATH": JSON.stringify(apiBasePath), - "process.env.AK_VERSION": JSON.stringify(pkg.version), - "preventAssignment": true, - }), nodeResolve({ extensions, browser: true }), commonjs(), babel({ @@ -88,6 +80,11 @@ export const defaultOptions = { babelHelpers: "runtime", include: ["src/**/*"], }), + replace({ + "process.env.NODE_ENV": JSON.stringify(isProdBuild ? "production" : "development"), + "process.env.AK_API_BASE_PATH": JSON.stringify(apiBasePath), + "preventAssignment": true, + }), isProdBuild && terser(), ].filter((p) => p), watch: { diff --git a/web/src/constants.ts b/web/src/constants.ts index 30a799de2..e66700b9c 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -1,11 +1,9 @@ -// Placeholder, replaced by rollup; -export const VERSION = process.env.AK_VERSION; - export const SECONDARY_CLASS = "pf-m-secondary"; export const SUCCESS_CLASS = "pf-m-success"; export const ERROR_CLASS = "pf-m-danger"; export const PROGRESS_CLASS = "pf-m-in-progress"; export const CURRENT_CLASS = "pf-m-current"; +export const VERSION = "2022.6.3"; export const TITLE_DEFAULT = "authentik"; export const ROUTE_SEPARATOR = ";";