diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-10-16 01:32:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-16 01:32:11 +0800 |
| commit | 6c001a951ae122b34c86eefcd9abc8f3a1e32a26 (patch) | |
| tree | 219c0840868e7494fc50d24ea952fdaaebefedd2 /build_files/install-instruments.sh | |
| parent | 3f7496d580f185c0974c5edc107570c471d0cdde (diff) | |
| parent | 3fbfb2bd4bb5e27509e8697018cddd105fca8dad (diff) | |
| download | AeroCore-OS-6c001a951ae122b34c86eefcd9abc8f3a1e32a26.tar.gz AeroCore-OS-6c001a951ae122b34c86eefcd9abc8f3a1e32a26.zip | |
Merge pull request #33 from AeroCore-IO/testing44.20261015
Promote tested Bazzite 44.20261012 updates to stable
Diffstat (limited to 'build_files/install-instruments.sh')
| -rwxr-xr-x | build_files/install-instruments.sh | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/build_files/install-instruments.sh b/build_files/install-instruments.sh index f85bd3b..0cf5fe6 100755 --- a/build_files/install-instruments.sh +++ b/build_files/install-instruments.sh @@ -48,7 +48,29 @@ github_curl() { args+=(--header "Authorization: Bearer $(</run/secrets/GITHUB_TOKEN)") fi - curl "${args[@]}" "$@" + if curl "${args[@]}" "$@"; then + return 0 + fi + + # The default release repository is public. A workflow token from another + # repository can be rejected by GitHub (403), even though anonymous access + # to the same release is allowed. Retry without credentials so a stale or + # cross-repository token cannot break public image builds. + if [[ -s /run/secrets/GITHUB_TOKEN ]]; then + local anonymous_args=( + --fail + --location + --retry 3 + --retry-delay 2 + --retry-max-time 60 + --silent + --show-error + ) + curl "${anonymous_args[@]}" "$@" + return $? + fi + + return 1 } if [[ "${INSTRUMENTS_VERSION}" == "latest" ]]; then @@ -129,13 +151,12 @@ required_paths=( install.sh appimage/AppRun appimage/AppRun.wrapped - sidecar/hhd-input-helper.cjs - sidecar/vendor/hhd-input-helper/instruments_hhd_input/__init__.py + sidecar/sidecar-main.cjs + sidecar/aerocore-bridge.cjs runtime/avionics runtime/cabin runtime/wing runtime/node/bin/node - python-wheelhouse pkg/systemd/ac-avionics.service pkg/systemd/ac-cabin.service pkg/systemd/ac-wing.service @@ -151,8 +172,7 @@ for path in "${required_paths[@]}"; do fi done -if [[ ! -f "$payload/pkg/aerocore-booster.sh" && - ! -f "$payload/pkg/instruments-ng.sh" ]]; then +if [[ ! -f "$payload/pkg/aerocore-booster.sh" ]]; then echo "Booster launcher is missing from the release payload" >&2 exit 1 fi |
