Skip to content

Commit 29f1d4b

Browse files
Improve error handling and path resolution in release workflow for Briefcase builds
1 parent 6d6f4ab commit 29f1d4b

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,17 @@ jobs:
450450
run: |
451451
set -euo pipefail
452452
v="${GITHUB_REF_NAME#v}"
453-
# Briefcase app key is dbs_annotator (underscore); some paths also use
454-
# a dbs-annotator segment for the .deb. Avoid a bare "find -name app"
455-
# (matches random site-packages *app* dirs and breaks tar).
456-
app_dir=$(find build/dbs_annotator/linux -type d \( -path "*/dbs_annotator/app" -o -path "*/dbs-annotator/app" \) 2>/dev/null | head -1) || true
453+
# Briefcase linux system: build/<app>/<vendor>/<codename>/... (not .../linux/...).
454+
# App key dbs_annotator; .deb may use dbs-annotator. No bare "find -name app".
455+
root="build/dbs_annotator"
456+
if [ ! -d "${root}" ]; then
457+
echo "::error::Missing Briefcase build tree at ${root}" >&2
458+
find build -maxdepth 3 -type d 2>/dev/null | head -40 >&2 || true
459+
exit 1
460+
fi
461+
app_dir=$(find "${root}" -type d \( -path "*/dbs_annotator/app" -o -path "*/dbs-annotator/app" \) 2>/dev/null | head -1) || true
457462
if [ -z "${app_dir}" ]; then
458-
stub=$(find build/dbs_annotator/linux -type f \( -name dbs-annotator -o -name dbs_annotator \) 2>/dev/null | head -1) || true
463+
stub=$(find "${root}" -type f \( -name dbs-annotator -o -name dbs_annotator \) 2>/dev/null | head -1) || true
459464
if [ -n "${stub}" ]; then
460465
d=$(dirname "${stub}")
461466
while [ "$(basename "${d}")" != "app" ] && [ "${d}" != "/" ] && [ -n "${d}" ]; do
@@ -467,8 +472,8 @@ jobs:
467472
fi
468473
fi
469474
if [ -z "${app_dir}" ]; then
470-
echo "::error::Could not find Briefcase 'app' tree under build/dbs_annotator/linux" >&2
471-
find build/dbs_annotator/linux -type d 2>/dev/null | head -80 >&2 || true
475+
echo "::error::Could not find Briefcase 'app' tree under ${root}" >&2
476+
find "${root}" -type d 2>/dev/null | head -80 >&2 || true
472477
exit 1
473478
fi
474479
parent=$(dirname "${app_dir}")

0 commit comments

Comments
 (0)