Skip to content

Commit

Permalink
1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dylmye committed Dec 22, 2024
1 parent a62c4bc commit 8914bf9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
23 changes: 11 additions & 12 deletions scripts/bump-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@ const updatePackageJson = async (version: string): Promise<void> => {
console.log("Updated package.json\n");
};

const updateAndroid = async (version: string): Promise<void> => {
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<void> => {
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 = {
Expand Down Expand Up @@ -92,7 +91,7 @@ const main = async (): Promise<void> => {
);
}
await updatePackageJson(versionNumber);
await updateAndroid(versionNumber);
await updateExpo(versionNumber);
await updateFdroid(versionNumber);
console.log("all done :)");
};
Expand Down
2 changes: 1 addition & 1 deletion webhooks/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 8914bf9

Please sign in to comment.