Skip to content

Commit 09b9062

Browse files
committed
dietpi-software: BirdNET-Go: align GitHub API call
Obtain final asset URL directly for host architecture, and align CI URL checks accordingly, including a test whether riscv64 binaries are available.
1 parent 7cbbd6b commit 09b9062

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/update_urls.bash

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ software_id=124
148148

149149
# BirdNET-Go
150150
software_id=127
151-
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/tphakala/birdnet-go/releases'\'' | mawk -F\" '\''/^ *"tag_name": "[^"]*",$/{print $4}'\'' | head -1'
152-
aREGEX[$software_id]='bnet_vers='\''[^'\'']*'\'
153-
aREPLACE[$software_id]='bnet_vers='\''$release'\'
151+
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/tphakala/birdnet-go/releases'\'' | mawk -F\" "/^ *\"browser_download_url\": \"[^\"]*-linux-$arch\.tar\.gz\"$/{print \$4}" | head -1'
152+
aARCH[$software_id]='arm64 amd64'
153+
aARCH_CHECK[$software_id]='riscv64'
154+
aREGEX[$software_id]='https://github.com/tphakala/birdnet-go/releases/download/.*-linux-\$arch\.tar\.gz'
154155

155156
# YaCy
156157
software_id=133

dietpi/dietpi-software

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11926,7 +11926,6 @@ _EOF_
1192611926

1192711927
if To_Install 127 birdnet # BirdNET-Go: https://github.com/tphakala/birdnet-go/blob/main/install.sh
1192811928
then
11929-
local bnet_vers=$(curl -s https://api.github.com/repos/tphakala/birdnet-go/releases | grep -oP '"tag_name":\s*"\K[^"]+' | head -n1)
1193011929
local bnet_inst='/opt/birdnet'
1193111930
local bnet_data='/mnt/dietpi_userdata/birdnet'
1193211931
local bnet_conf="$bnet_data/.config/birdnet-go/config.yaml"
@@ -11945,7 +11944,8 @@ _EOF_
1194511944
esac
1194611945

1194711946
# Download
11948-
Download_Install "https://github.com/tphakala/birdnet-go/releases/download/$bnet_vers/birdnet-go-linux-$arch.tar.gz" birdnet
11947+
local fallback_url="https://github.com/tphakala/birdnet-go/releases/download/nightly-20251223/birdnet-go-linux-$arch.tar.gz"
11948+
Download_Install "$(curl -sSfL 'https://api.github.com/repos/tphakala/birdnet-go/releases' | mawk -F\" "/^ *\"browser_download_url\": \"[^\"]*-linux-$arch\.tar\.gz\"$/{print \$4}" | head -1)"
1194911949

1195011950
# Change rpath for birdnet-go to make use of libtensorflowlite_c.so in its own dir
1195111951
G_EXEC patchelf --set-rpath "$bnet_inst" birdnet/birdnet-go

0 commit comments

Comments
 (0)