Skip to content

Commit

Permalink
build: move version into app.config.ts, not environment
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Jul 3, 2024
1 parent ff24e6e commit 22d8653
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-shared-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
ENV: ${{ inputs.ENV }}
TERRASO_BACKEND: ${{ inputs.TERRASO_BACKEND }}
APP_BUILD: ${{ inputs.APP_BUILD }}
APP_VERSION: ${{ vars.APP_VERSION }}
GOOGLE_OAUTH_ANDROID_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_ANDROID_CLIENT_ID }}
GOOGLE_OAUTH_IOS_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_IOS_CLIENT_ID }}
GOOGLE_OAUTH_IOS_URI_SCHEME: ${{ vars.GOOGLE_OAUTH_IOS_URI_SCHEME }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-shared-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
ENV: ${{ inputs.ENV }}
TERRASO_BACKEND: ${{ inputs.TERRASO_BACKEND }}
APP_BUILD: ${{ inputs.APP_BUILD }}
APP_VERSION: ${{ vars.APP_VERSION }}
GOOGLE_OAUTH_ANDROID_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_ANDROID_CLIENT_ID }}
GOOGLE_OAUTH_IOS_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_IOS_CLIENT_ID }}
GOOGLE_OAUTH_IOS_URI_SCHEME: ${{ vars.GOOGLE_OAUTH_IOS_URI_SCHEME }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/ios_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: iOS Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (i.e. 1.0.1)'
default: '1.0.0'
type: string
required: true
APP_BUILD:
description: 'Build number (i.e. 153)'
default: '153'
Expand Down
10 changes: 1 addition & 9 deletions dev-client/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const BUILD_CONFIG = validateEnvConfig(process.env, [
] as const);

const ENV_CONFIG = validateEnvConfig(process.env, [
'APP_VERSION',
'APP_BUILD',
'CI',
'ENV',
Expand All @@ -63,8 +62,6 @@ const ENV_CONFIG = validateEnvConfig(process.env, [
] as const);

let buildNumber = 1;
let versionNumber = '1.0';
const APP_VERSION = process.env.APP_VERSION;
const APP_BUILD = process.env.APP_BUILD;

if (typeof APP_BUILD === 'string') {
Expand All @@ -79,16 +76,11 @@ if (typeof APP_BUILD === 'string') {
ENV_CONFIG.APP_BUILD = buildNumber.toString();
}

if (typeof APP_VERSION === 'string') {
versionNumber = APP_VERSION;
ENV_CONFIG.APP_VERSION = versionNumber;
}

export default ({config}: ConfigContext): ExpoConfig => ({
...config,
name: 'LandPKS Soil ID',
slug: 'landpks',
version: versionNumber,
version: '1.0.0',
orientation: 'portrait',
splash: {
image: 'src/assets/splash.png',
Expand Down
2 changes: 1 addition & 1 deletion dev-client/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export const APP_CONFIG = {
sentryDsn: ENV_CONFIG.SENTRY_DSN,
sentryEnabled: sentryEnabled === 'true',
environment: ENV_CONFIG.ENV,
version: ENV_CONFIG.APP_VERSION,
build: ENV_CONFIG.APP_BUILD,
version: Constants.expoConfig!.version,
googleClientId,
googleRedirectURI,
microsoftRedirectURI,
Expand Down

0 comments on commit 22d8653

Please sign in to comment.