Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Shell installers must be LF: piping to sh on Linux breaks on CRLF.
scripts/*.sh text eol=lf
27 changes: 12 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,19 @@ jobs:
find build -maxdepth 3 -type d 2>/dev/null | head -40 >&2 || true
exit 1
fi
app_dir=$(find "${root}" -type d \( -path "*/dbs_annotator/app" -o -path "*/dbs-annotator/app" \) 2>/dev/null | head -1) || true
if [ -z "${app_dir}" ]; then
stub=$(find "${root}" -type f \( -name dbs-annotator -o -name dbs_annotator \) 2>/dev/null | head -1) || true
if [ -n "${stub}" ]; then
d=$(dirname "${stub}")
while [ "$(basename "${d}")" != "app" ] && [ "${d}" != "/" ] && [ -n "${d}" ]; do
d=$(dirname "${d}")
done
if [ "$(basename "${d}")" = "app" ] && [ -d "${d}/src" ]; then
app_dir=${d}
fi
fi
# There may be multiple */app trees (e.g. shallow copy vs full system package with bin/).
# Pick the *largest* by disk — sources-only is tiny; real Briefcase tree includes bin/, lib/, support.
app_dir=""
if largest=$(find "${root}" -type d -name app 2>/dev/null | while read -r d; do du -sk "$d" 2>/dev/null; done | sort -n | tail -1); then
app_dir=${largest#*[[:space:]]}
fi
if [ -z "${app_dir}" ]; then
echo "::error::Could not find Briefcase 'app' tree under ${root}" >&2
find "${root}" -type d 2>/dev/null | head -80 >&2 || true
if [ -z "${app_dir}" ] || [ ! -d "${app_dir}/bin" ] || [ -z "$(find "${app_dir}/bin" -mindepth 1 -maxdepth 1 2>/dev/null | head -n 1)" ]; then
echo "::error::No Briefcase Linux app/ with a non-empty bin/ under ${root} (raw tar would lack the launcher). Listing app candidates:" >&2
find "${root}" -type d -name app 2>/dev/null | while read -r d; do
echo "--- $d" >&2
du -sh "$d" 2>/dev/null || true
find "${d}/bin" -mindepth 1 -maxdepth 1 2>/dev/null | head -20 >&2 || true
done
exit 1
fi
parent=$(dirname "${app_dir}")
Expand Down
1 change: 1 addition & 0 deletions newsfragments/80.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `scripts/install.sh` for POSIX `sh`, LF line endings, Linux launcher discovery (`bin/`, `dbs_annotator`), and clearer errors when a release raw `.tar.gz` lacks the Briefcase stub. Linux release workflow now selects the full `app/` tree (largest tree with `bin/`) for the raw archive.
7 changes: 6 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ install_linux_tar() {
mkdir -p "$bin_dir"
exe=$(linux_pick_exe "$prefix")
if [ -z "$exe" ] || [ ! -x "$exe" ]; then
echo "Could not find executable under $prefix" >&2; exit 1
if [ -f "$prefix/dbs_annotator/__main__.py" ] && [ ! -d "$prefix/bin" ]; then
echo "Could not find Briefcase launcher under $prefix (missing bin/ stub). Raw .tar.gz for this version is source-only; use the .deb from the same release, or a release built after the raw-tar workflow fix." >&2
else
echo "Could not find executable under $prefix" >&2
fi
exit 1
fi
ln -sf "$exe" "$bin_dir/dbs-annotator"
echo "Installed tree: $prefix"
Expand Down
Loading