Slice full hash for display in app
This commit is contained in:
Vendored
+1
-1
@@ -15,6 +15,6 @@ export const APP_VERSION = `${packageJson.version}.${nativeBuildVersion}`
|
|||||||
/**
|
/**
|
||||||
* The short commit hash and environment of the current bundle.
|
* The short commit hash and environment of the current bundle.
|
||||||
*/
|
*/
|
||||||
export const APP_METADATA = `${BUNDLE_IDENTIFIER} (${
|
export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${
|
||||||
__DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
|
__DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
|
||||||
})`
|
})`
|
||||||
|
|||||||
Vendored
+1
-1
@@ -13,4 +13,4 @@ export const APP_VERSION = packageJson.version
|
|||||||
/**
|
/**
|
||||||
* The short commit hash and environment of the current bundle.
|
* The short commit hash and environment of the current bundle.
|
||||||
*/
|
*/
|
||||||
export const APP_METADATA = `${BUNDLE_IDENTIFIER} (${__DEV__ ? 'dev' : 'prod'})`
|
export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${__DEV__ ? 'dev' : 'prod'})`
|
||||||
|
|||||||
@@ -22,11 +22,7 @@ import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/i
|
|||||||
import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
|
import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import {
|
import * as env from '#/env'
|
||||||
APP_METADATA as bundleInfo,
|
|
||||||
APP_VERSION as appVersion,
|
|
||||||
BUNDLE_DATE,
|
|
||||||
} from '#/env'
|
|
||||||
import {useDemoMode} from '#/storage/hooks/demo-mode'
|
import {useDemoMode} from '#/storage/hooks/demo-mode'
|
||||||
import {useDevMode} from '#/storage/hooks/dev-mode'
|
import {useDevMode} from '#/storage/hooks/dev-mode'
|
||||||
import {OTAInfo} from './components/OTAInfo'
|
import {OTAInfo} from './components/OTAInfo'
|
||||||
@@ -127,7 +123,7 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
</SettingsList.PressableItem>
|
</SettingsList.PressableItem>
|
||||||
)}
|
)}
|
||||||
<SettingsList.PressableItem
|
<SettingsList.PressableItem
|
||||||
label={_(msg`Version ${appVersion}`)}
|
label={_(msg`Version ${env.APP_VERSION}`)}
|
||||||
accessibilityHint={_(msg`Copies build version to clipboard`)}
|
accessibilityHint={_(msg`Copies build version to clipboard`)}
|
||||||
onLongPress={() => {
|
onLongPress={() => {
|
||||||
const newDevModeEnabled = !devModeEnabled
|
const newDevModeEnabled = !devModeEnabled
|
||||||
@@ -150,15 +146,15 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setStringAsync(
|
setStringAsync(
|
||||||
`Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`,
|
`Build version: ${env.APP_VERSION}; Bundle info: ${env.APP_METADATA}; Bundle date: ${env.BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`,
|
||||||
)
|
)
|
||||||
Toast.show(_(msg`Copied build version to clipboard`))
|
Toast.show(_(msg`Copied build version to clipboard`))
|
||||||
}}>
|
}}>
|
||||||
<SettingsList.ItemIcon icon={WrenchIcon} />
|
<SettingsList.ItemIcon icon={WrenchIcon} />
|
||||||
<SettingsList.ItemText>
|
<SettingsList.ItemText>
|
||||||
<Trans>Version {appVersion}</Trans>
|
<Trans>Version {env.APP_VERSION}</Trans>
|
||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
<SettingsList.BadgeText>{bundleInfo}</SettingsList.BadgeText>
|
<SettingsList.BadgeText>{env.APP_METADATA}</SettingsList.BadgeText>
|
||||||
</SettingsList.PressableItem>
|
</SettingsList.PressableItem>
|
||||||
{devModeEnabled && (
|
{devModeEnabled && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user