release stuff

This commit is contained in:
EthanShoeDev
2025-10-04 22:48:12 -04:00
parent ae397d4756
commit 349a7575d7
4 changed files with 45 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
{
"npm": false,
"git": {
"requireCleanWorkingDir": true,
"commitMessage": "chore(release): v${version}",
"tagName": "v${version}",
"push": true
},
"github": {
"release": true,
"assets": ["android/app/build/outputs/apk/release/app-release.apk"]
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
}
},
"hooks": {
"before:init": ["pnpm run lint:check", "pnpm run typecheck"],
"before:github:release": "pnpm run build:signed:apk"
}
}

View File

@@ -2,6 +2,14 @@ import { type ExpoConfig } from 'expo/config';
import 'tsx/cjs'; import 'tsx/cjs';
import packageJson from './package.json'; import packageJson from './package.json';
function semverToCode(v: string) {
const [maj, min, pat] = v.split('.').map((n) => parseInt(n || '0', 10));
if (maj === undefined || min === undefined || pat === undefined)
throw new Error(`Invalid version: ${v}`);
return maj * 10000 + min * 100 + pat;
}
const versionCode = semverToCode(packageJson.version);
const config: ExpoConfig = { const config: ExpoConfig = {
name: 'Fressh', name: 'Fressh',
slug: 'fressh', slug: 'fressh',
@@ -15,9 +23,11 @@ const config: ExpoConfig = {
supportsTablet: true, supportsTablet: true,
config: { usesNonExemptEncryption: false }, config: { usesNonExemptEncryption: false },
bundleIdentifier: 'dev.fressh.app', bundleIdentifier: 'dev.fressh.app',
buildNumber: String(versionCode),
}, },
android: { android: {
package: 'dev.fressh.app', package: 'dev.fressh.app',
versionCode,
adaptiveIcon: { adaptiveIcon: {
foregroundImage: '../../packages/assets/adaptive-icon.png', foregroundImage: '../../packages/assets/adaptive-icon.png',
backgroundColor: '#151718', backgroundColor: '#151718',

View File

@@ -23,7 +23,9 @@
"expo:dep:check": "expo install --fix", "expo:dep:check": "expo install --fix",
"expo:doctor": "pnpm dlx expo-doctor@latest", "expo:doctor": "pnpm dlx expo-doctor@latest",
"test:e2e": "maestro test test/e2e/", "test:e2e": "maestro test test/e2e/",
"adb:logs": "while ! adb logcat --pid=$(adb shell pidof -s dev.fressh.app); do sleep 1; done" "adb:logs": "while ! adb logcat --pid=$(adb shell pidof -s dev.fressh.app); do sleep 1; done",
"release": "release-it",
"release:dry": "release-it --dry-run"
}, },
"dependencies": { "dependencies": {
"@expo/vector-icons": "^15.0.2", "@expo/vector-icons": "^15.0.2",
@@ -77,6 +79,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
"@eslint-react/eslint-plugin": "^1.53.0", "@eslint-react/eslint-plugin": "^1.53.0",
"@eslint/js": "^9.35.0", "@eslint/js": "^9.35.0",
"@release-it/conventional-changelog": "^10.0.1",
"@tanstack/eslint-plugin-query": "^5.86.0", "@tanstack/eslint-plugin-query": "^5.86.0",
"@types/react": "~19.1.12", "@types/react": "~19.1.12",
"@typescript-eslint/parser": "^8.44.0", "@typescript-eslint/parser": "^8.44.0",
@@ -93,6 +96,7 @@
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.2.0", "prettier-plugin-organize-imports": "^4.2.0",
"release-it": "^19.0.4",
"tsx": "^4.20.5", "tsx": "^4.20.5",
"typescript": "~5.9.2", "typescript": "~5.9.2",
"typescript-eslint": "^8.44.0" "typescript-eslint": "^8.44.0"

8
pnpm-lock.yaml generated
View File

@@ -194,6 +194,9 @@ importers:
'@eslint/js': '@eslint/js':
specifier: ^9.35.0 specifier: ^9.35.0
version: 9.35.0 version: 9.35.0
'@release-it/conventional-changelog':
specifier: ^10.0.1
version: 10.0.1(conventional-commits-filter@5.0.0)(conventional-commits-parser@6.2.0)(release-it@19.0.4(@types/node@24.3.0)(magicast@0.3.5))
'@tanstack/eslint-plugin-query': '@tanstack/eslint-plugin-query':
specifier: ^5.86.0 specifier: ^5.86.0
version: 5.89.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) version: 5.89.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)
@@ -242,6 +245,9 @@ importers:
prettier-plugin-organize-imports: prettier-plugin-organize-imports:
specifier: ^4.2.0 specifier: ^4.2.0
version: 4.2.0(prettier@3.6.2)(typescript@5.9.2) version: 4.2.0(prettier@3.6.2)(typescript@5.9.2)
release-it:
specifier: ^19.0.4
version: 19.0.4(@types/node@24.3.0)(magicast@0.3.5)
tsx: tsx:
specifier: ^4.20.5 specifier: ^4.20.5
version: 4.20.5 version: 4.20.5
@@ -14813,7 +14819,7 @@ snapshots:
get-tsconfig: 4.10.1 get-tsconfig: 4.10.1
is-bun-module: 2.0.0 is-bun-module: 2.0.0
stable-hash: 0.0.5 stable-hash: 0.0.5
tinyglobby: 0.2.14 tinyglobby: 0.2.15
unrs-resolver: 1.11.1 unrs-resolver: 1.11.1
optionalDependencies: optionalDependencies:
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.35.0(jiti@2.5.1))