diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3041f2a..6fca011 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -69,7 +69,7 @@ body: attributes: label: App Version description: Which version of BitSleuth Wallet are you using? - placeholder: e.g., 1.2.1 + placeholder: e.g., 1.2.2 validations: required: true diff --git a/CLAUDE.md b/CLAUDE.md index 9e580c4..f4be03b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -208,6 +208,21 @@ node scripts/test-biometric.js | Constants | UPPER_SNAKE_CASE | `MAX_FEE_RATE` | | Types/Interfaces | PascalCase | `WalletState` | +### Version Update Checklist (MUST FOLLOW) + +When asked to bump/update the app version, update **ALL** of the following: + +1. `app.json` (`expo.version`) — **drives all in-app version displays** (splash screen, About screen, Settings, Crashlytics) via `constants/app-version.ts` +2. `package.json` (`version`) +3. `android/app/build.gradle` (`versionName`, and bump `versionCode`) +4. `ios/BitSleuthWallet/Info.plist` (`CFBundleShortVersionString`) +5. `CHANGELOG.md` — add the new release entry +6. `README.md` — version badge near the top +7. `app/about.tsx` — add a "What's New in X.Y.Z?" `DropdownSection` at the top with `defaultExpanded={true}` (remove `defaultExpanded` from the previous version's section) +8. `.github/ISSUE_TEMPLATE/bug_report.yml` — App Version placeholder example + +**NEVER hardcode the version number in components or services.** Always import `APP_VERSION` from `@/constants/app-version`, which reads it from `app.json` via `expo-constants`. + ### Documentation Organization **All markdown files MUST go in the `docs/` folder**, with these exceptions: diff --git a/README.md b/README.md index 9ae370b..a12f0d8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ **A professional-grade, non-custodial Bitcoin wallet for iOS and Android** -[![Version](https://img.shields.io/badge/version-1.2.1-blue.svg)](https://github.com/BitSleuthAI/Wallet) +[![Version](https://img.shields.io/badge/version-1.2.2-blue.svg)](https://github.com/BitSleuthAI/Wallet) [![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20Android-lightgrey.svg)](https://github.com/BitSleuthAI/Wallet) [![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE) [![React Native](https://img.shields.io/badge/React%20Native-0.81-61dafb.svg)](https://reactnative.dev/) diff --git a/app/(tabs)/settings.tsx b/app/(tabs)/settings.tsx index bc871e5..23c4011 100644 --- a/app/(tabs)/settings.tsx +++ b/app/(tabs)/settings.tsx @@ -6,6 +6,7 @@ import { useAutoLock } from '@/hooks/auto-lock-store'; import { useTabAnimation } from '@/hooks/use-tab-animation'; import { useWallet } from '@/hooks/wallet-store'; import { HapticService } from '@/services/haptic-service'; +import { APP_VERSION } from '@/constants/app-version'; import type { FiatCurrency } from '@/types/wallet'; import { getWalletTypeDisplayName } from '@/types/wallet'; @@ -377,7 +378,7 @@ function SettingsScreenContent() { router.push('/about')} /> diff --git a/app/about.tsx b/app/about.tsx index fc7535b..6f854b6 100644 --- a/app/about.tsx +++ b/app/about.tsx @@ -15,6 +15,7 @@ import { useWallet } from '@/hooks/wallet-store'; import { GradientBackground } from '@/components/GradientBackground'; import { AndroidSafeContainer } from '@/components/AndroidSafeContainer'; import crashlyticsService from '@/services/crashlytics-service'; +import { APP_VERSION } from '@/constants/app-version'; interface DropdownSectionProps { title: string; @@ -103,11 +104,20 @@ export default function AboutScreen() { About BitSleuth Wallet - Version 1.2.1 + Version {APP_VERSION} - + + + + + + + + + + diff --git a/components/SplashScreen.tsx b/components/SplashScreen.tsx index cfa2273..72da207 100644 --- a/components/SplashScreen.tsx +++ b/components/SplashScreen.tsx @@ -9,6 +9,7 @@ import { View, } from 'react-native'; import Svg, { Circle, Path } from 'react-native-svg'; +import { APP_VERSION } from '@/constants/app-version'; interface SplashScreenProps { onAnimationComplete?: () => void; @@ -122,7 +123,7 @@ export default function SplashScreen({ onAnimationComplete }: SplashScreenProps) {/* Version and description */} - v1.2.1 + {`v${APP_VERSION}`} Bitcoin Wallet diff --git a/constants/app-version.ts b/constants/app-version.ts new file mode 100644 index 0000000..01b39dc --- /dev/null +++ b/constants/app-version.ts @@ -0,0 +1,6 @@ +import Constants from 'expo-constants'; + +// Single source of truth for the displayed app version, read from app.json. +// Bump expo.version in app.json and every consumer (splash screen, About, +// Settings, Crashlytics) updates automatically. +export const APP_VERSION: string = Constants.expoConfig?.version ?? '0.0.0'; diff --git a/services/crashlytics-service.ts b/services/crashlytics-service.ts index ecd78ec..946e546 100644 --- a/services/crashlytics-service.ts +++ b/services/crashlytics-service.ts @@ -1,4 +1,5 @@ import { Platform } from 'react-native'; +import { APP_VERSION } from '@/constants/app-version'; // Firebase Crashlytics with fallback for web/missing native module let crashlytics: any = null; @@ -253,7 +254,7 @@ if (isInitialized && crashlytics && !isExpoGo) { crashlytics.setUserId('anonymous'); crashlytics.setAttributes({ platform: Platform.OS, - appVersion: '1.2.1', + appVersion: APP_VERSION, buildType: __DEV__ ? 'debug' : 'release', environment: 'development-build', });