diff --git a/app.json b/app.json index 93b6793..50bc05e 100644 --- a/app.json +++ b/app.json @@ -6,7 +6,7 @@ "slug": "setlist-sherlock", "owner": "dylmye", "scheme": "setlist-sherlock", - "version": "1.5.0", + "version": "1.5.1", "orientation": "portrait", "userInterfaceStyle": "automatic", "newArchEnabled": true, diff --git a/scripts/bump-version.ts b/scripts/bump-version.ts index 71464e3..26d7882 100644 --- a/scripts/bump-version.ts +++ b/scripts/bump-version.ts @@ -16,20 +16,19 @@ const updatePackageJson = async (version: string): Promise => { console.log("Updated package.json\n"); }; -const updateAndroid = async (version: string): Promise => { - console.log("Updating build.gradle..."); - const filename = "./android/app/build.gradle"; - let buildGradle = await Bun.file(filename).text(); - buildGradle = buildGradle.replace( - /(\s+versionName\s")(.+)(")/, - `$1${version}$3`, - ); +const updateExpo = async (version: string): Promise => { + console.log("Updating app.json..."); + const filename = "./app.json"; + const json = await Bun.file(filename).json(); try { - await Bun.write(filename, buildGradle); + await Bun.write( + filename, + JSON.stringify(Object.assign(json, { version }), null, 2), + ); } catch { - throw new Error("Unable to update build.gradle"); + throw new Error("Unable to update app.json"); } - console.log("Updated build.gradle\n"); + console.log("Updated app.json\n"); }; type FdroidMetadata = { @@ -92,7 +91,7 @@ const main = async (): Promise => { ); } await updatePackageJson(versionNumber); - await updateAndroid(versionNumber); + await updateExpo(versionNumber); await updateFdroid(versionNumber); console.log("all done :)"); }; diff --git a/webhooks/index.mjs b/webhooks/index.mjs index 847c919..a6585f9 100644 --- a/webhooks/index.mjs +++ b/webhooks/index.mjs @@ -12,7 +12,7 @@ export const isVerifiedRequest = (payload, providedHash) => { /** @type import('aws-lambda').LambdaFunctionURLHandler */ export const handler = async ({ body, headers }) => { - console.log("Origin header:", headers["origin"]); + console.log("Body:", body); if (!isVerifiedRequest(body, headers["expo-signature"])) { throw new Error("Unexpected hash result"); }