fix(scripts): update watch target regex to match SwimBuddyWatch without space

This commit is contained in:
2026-08-18 11:46:19 +02:00
parent 5e797c32e7
commit 9ded984543
+3 -3
View File
@@ -43,7 +43,7 @@ if (content.includes(SENTRY_REPO_URL)) {
// ── Find watch target UUID ──
const watchTargetMatch = content.match(
/(\w{24})\s*\/\* SwimBuddy Watch \*\/\s*=\s*\{\s*\n\s*isa = PBXNativeTarget;\s*\n\s*buildConfigurationList = \w+ /
/(\w{24})\s*\/\* SwimBuddyWatch \*\/\s*=\s*\{\s*\n\s*isa = PBXNativeTarget;\s*\n\s*buildConfigurationList = \w+ /
);
if (!watchTargetMatch) {
console.error("Watch target not found");
@@ -55,7 +55,7 @@ console.log(`Watch target: ${watchTargetUuid}`);
// ── Find watch target's Frameworks build phase UUID ──
const watchTargetBlock = content.match(
new RegExp(
`${watchTargetUuid}\\s*\\/\\* SwimBuddy Watch \\*\\/\\s*=\\s*\\{[\\s\\S]*?buildPhases\\s*=\\s*\\(([\\s\\S]*?)\\);`
`${watchTargetUuid}\\s*\\/\\* SwimBuddyWatch \\*\\/\\s*=\\s*\\{[\\s\\S]*?buildPhases\\s*=\\s*\\(([\\s\\S]*?)\\);`
)
);
if (!watchTargetBlock) {
@@ -143,7 +143,7 @@ if (!content.includes("packageReferences = (")) {
const prodDepComment = `${prodDepId} /* ${SENTRY_PRODUCT} */`;
// Find the watch target block and check if packageProductDependencies exists
const wtPattern = new RegExp(
`(${watchTargetUuid}\\s*\\/\\* SwimBuddy Watch \\*\\/ = \\{[\\s\\S]*?fileSystemSynchronizedGroups = \\([\\s\\S]*?\\);[\\s\\S]*?)(name = )`
`(${watchTargetUuid}\\s*\\/\\* SwimBuddyWatch \\*\\/ = \\{[\\s\\S]*?fileSystemSynchronizedGroups = \\([\\s\\S]*?\\);[\\s\\S]*?)(name = )`
);
const wtMatch = content.match(wtPattern);
if (wtMatch && !content.includes("packageProductDependencies")) {