Skip to content

Commit

Permalink
Revert "feat: add avs version to webapp (#17518)"
Browse files Browse the repository at this point in the history
This reverts commit 7141a41.
  • Loading branch information
PatrykBuniX committed Jun 7, 2024
1 parent 7141a41 commit 32ed4ef
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 17 deletions.
3 changes: 1 addition & 2 deletions server/config/client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {ConfigGeneratorParams} from './config.types';
import {Env} from './env';

export function generateConfig(params: ConfigGeneratorParams, env: Env) {
const {urls, version, env: nodeEnv, dependencies} = params;
const {urls, version, env: nodeEnv} = params;
return {
APP_BASE: urls.base,
ANALYTICS_API_KEY: env.ANALYTICS_API_KEY,
Expand Down Expand Up @@ -108,7 +108,6 @@ export function generateConfig(params: ConfigGeneratorParams, env: Env) {
WHATS_NEW: env.URL_WHATS_NEW,
},
VERSION: version,
AVS_VERSION: dependencies.avs,
WEBSITE_LABEL: env.WEBSITE_LABEL,
} as const;
}
3 changes: 0 additions & 3 deletions server/config/config.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ export type ConfigGeneratorParams = {
};
commit: string;
version: string;
dependencies: {
avs: string;
};
};
8 changes: 0 additions & 8 deletions server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ import {Env} from './env';
import {generateConfig as generateServerConfig} from './server.config';

const versionData = readFileSync(path.resolve(__dirname, './version.json'), 'utf8');
const packageJsonData = readFileSync(path.resolve(__dirname, '../../../package.json'), 'utf8');

const version = versionData ? JSON.parse(versionData) : {version: 'unknown', commit: 'unknown'};
const packageJson = packageJsonData ? JSON.parse(packageJsonData) : null;

const readDependencyVersion = (name: string): string => packageJson?.dependencies?.[name] || 'unknown';

const env = dotenv.load({
includeProcessEnv: true,
Expand Down Expand Up @@ -62,9 +57,6 @@ function generateUrls() {
const commonConfig = {
commit: version.commit,
version: version.version,
dependencies: {
avs: readDependencyVersion('@wireapp/avs'),
},
env: env.NODE_ENV || 'production',
urls: generateUrls(),
};
Expand Down
1 change: 0 additions & 1 deletion src/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,6 @@
"preferencesAboutSupportWebsite": "Support website",
"preferencesAboutTermsOfUse": "Terms of use",
"preferencesAboutVersion": "Version {{version}}",
"preferencesAboutAVSVersion": "AVS version {{version}}",
"preferencesAboutWebsite": "{{brandName}} website",
"preferencesAccount": "Account",
"preferencesAccountAccentColor": "Set a profile color",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const AboutPreferences: React.FC<AboutPreferencesProps> = ({selfUser, teamState
)}
<PreferencesSection hasSeparator>
<p className="preferences-detail">{t('preferencesAboutVersion', config.VERSION)}</p>
<p className="preferences-detail">{t('preferencesAboutAVSVersion', config.AVS_VERSION)}</p>
<p className="preferences-detail">{t('preferencesAboutCopyright')}</p>
</PreferencesSection>
</PreferencesPage>
Expand Down
2 changes: 0 additions & 2 deletions src/script/util/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ interface Environment {
isProduction: typeof isProduction;
};
version: (showWrapperVersion?: boolean) => string;
avsVersion: () => string;
}

export const Environment: Environment = {
Expand All @@ -68,5 +67,4 @@ export const Environment: Environment = {
const showElectronVersion = electronVersion && showWrapperVersion;
return showElectronVersion ? electronVersion : Config.getConfig().VERSION;
},
avsVersion: (): string => Config.getConfig().AVS_VERSION,
};

0 comments on commit 32ed4ef

Please sign in to comment.