@@ -450,17 +450,30 @@ jobs:
450450 run : |
451451 set -euo pipefail
452452 v="${GITHUB_REF_NAME#v}"
453- app_dir=$(find build/dbs_annotator/linux -path "*/dbs-annotator/app" -type d 2>/dev/null | head -1)
454- if [ -z "$app_dir" ]; then
455- app_dir=$(find build/dbs_annotator/linux -type d -name app 2>/dev/null | head -1)
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
457+ 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
459+ if [ -n "${stub}" ]; then
460+ d=$(dirname "${stub}")
461+ while [ "$(basename "${d}")" != "app" ] && [ "${d}" != "/" ] && [ -n "${d}" ]; do
462+ d=$(dirname "${d}")
463+ done
464+ if [ "$(basename "${d}")" = "app" ] && [ -d "${d}/src" ]; then
465+ app_dir=${d}
466+ fi
467+ fi
456468 fi
457- if [ -z "$app_dir" ]; then
458- echo "::error::No application 'app' tree under build/dbs_annotator/linux" >&2
469+ 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
459472 exit 1
460473 fi
461- parent=$(dirname "$app_dir")
474+ parent=$(dirname "${ app_dir} ")
462475 out="${GITHUB_WORKSPACE}/dist/dbs-annotator_${v}_linux_x86_64-raw.tar.gz"
463- (cd "$parent" && tar -czf "$out" "$(basename "$app_dir")")
476+ (cd "${ parent} " && tar -czf "${ out} " "$(basename "${ app_dir} ")")
464477 echo "Linux raw: dist/dbs-annotator_${v}_linux_x86_64-raw.tar.gz"
465478
466479 - name : Upload Briefcase Linux artifacts
0 commit comments