From bc991f2b6d0bc0b750e623fe41cdf3ed2d715cc6 Mon Sep 17 00:00:00 2001 From: barshathakuri Date: Wed, 18 Dec 2024 11:04:46 +0545 Subject: [PATCH] bump version to 1.0.0 and add release notes --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 8 +++++++- src/components/GlobalFooter/index.tsx | 12 ++++++++++-- src/config.ts | 4 ++++ src/declarations/env.d.ts | 2 ++ vite.config.ts | 3 +++ 6 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..b80ead78 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# go-alert-hub + +### Major Changes + +## 1.0.0 + +- 889066b: Add subscription modal, authentication and hcapcha. + + - Add login + - Add Register + - Add Historical alert + +### Patch Changes + +- Updated dependencies and add patch [889066b] + - @ifrc-go/ui@1.2.1.patch + + +- 0d0ae7b: Bug fixes \ No newline at end of file diff --git a/package.json b/package.json index a0ae8148..575c3ae0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,14 @@ { "name": "ifrc-alert-hub", - "version": "0.0.1", + "version": "1.0.0", "type": "module", "private": true, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/IFRCGo/alert-hub-web-app.git", + "directory": "app" + }, "scripts": { "start": "vite", "build": "vite build", diff --git a/src/components/GlobalFooter/index.tsx b/src/components/GlobalFooter/index.tsx index 70d21710..1b9d648b 100644 --- a/src/components/GlobalFooter/index.tsx +++ b/src/components/GlobalFooter/index.tsx @@ -10,6 +10,8 @@ import Link from '#components/Link'; import { appCommitHash, appVersion, + appPackageName, + appRepositoryUrl, } from '#config'; import i18n from './i18n.json'; @@ -28,14 +30,20 @@ function GlobalFooter(props: Props) { } = props; const strings = useTranslation(i18n); + const versionTag = `${appPackageName}@${appVersion}`; + const versionUrl = `${appRepositoryUrl}/releases/tag/${versionTag}`; const copyrightText = resolveToComponent( strings.footerIFRC, { year, appVersion: ( - + {appVersion} - + ), }, ); diff --git a/src/config.ts b/src/config.ts index 17986041..c73334a8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -6,6 +6,8 @@ const { APP_COMMIT_HASH, APP_VERSION, APP_HCAPTCHA_SITEKEY, + APP_PACKAGE_NAME, + APP_REPOSITORY_URL, } = import.meta.env; export const appTitle = APP_TITLE; // not used @@ -15,3 +17,5 @@ export const mapboxToken = APP_MAPBOX_ACCESS_TOKEN; export const hCaptchaKey = APP_HCAPTCHA_SITEKEY; export const appCommitHash = APP_COMMIT_HASH; export const appVersion = APP_VERSION; +export const appPackageName = APP_PACKAGE_NAME; +export const appRepositoryUrl = APP_REPOSITORY_URL; diff --git a/src/declarations/env.d.ts b/src/declarations/env.d.ts index 47391c40..683b9047 100644 --- a/src/declarations/env.d.ts +++ b/src/declarations/env.d.ts @@ -8,6 +8,8 @@ interface ImportMetaEnv extends ImportMetaEnvAugmented { // The custom environment variables that are passed through the vite APP_COMMIT_HASH: string; APP_VERSION: string; + APP_PACKAGE_NAME: string; + APP_REPOSITORY_URL: string; } interface ImportMeta { diff --git a/vite.config.ts b/vite.config.ts index 45403fd5..e8288a3c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,7 @@ import { compression } from 'vite-plugin-compression2'; import checker from 'vite-plugin-checker'; import { ValidateEnv as validateEnv } from '@julr/vite-plugin-validate-env'; import { VitePluginRadar } from 'vite-plugin-radar'; +import pkg from './package.json'; import alertHubPackage from './package.json'; import envConfig from './env'; @@ -22,6 +23,8 @@ export default defineConfig(({ mode }) => { define: { 'import.meta.APP_COMMIT_HASH': JSON.stringify(commitHash), 'import.meta.env.APP_VERSION': JSON.stringify(alertHubPackage.version), + 'import.meta.env.APP_PACKAGE_NAME': JSON.stringify(env.npm_package_name), + 'import.meta.env.APP_REPOSITORY_URL': JSON.stringify(pkg.repository.url.match(/https:\/\/github\.com\/[^ ]+/)?.[0].replace(/\.git$/, '')), }, plugins: [ isProd ? checker({