Skip to content

Commit

Permalink
make webapp downloads on forks possible
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Dec 16, 2023
1 parent 904f211 commit 2f57174
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions installation/routines/setup_jukebox_webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ _jukebox_webapp_download() {
local git_head_hash=$(git -C "${INSTALLATION_PATH}" rev-parse --verify --quiet HEAD)
local tar_filename="webapp-build.tar.gz"
# URL must be set to default repo as installation can be run from different repos as well where releases may not exist
local download_url_commit="https://github.com/MiczFlor/RPi-Jukebox-RFID/releases/download/v${jukebox_version}/webapp-build-${git_head_hash}.tar.gz"
local download_url_latest="https://github.com/MiczFlor/RPi-Jukebox-RFID/releases/download/v${jukebox_version}/webapp-build-latest.tar.gz"
local download_url_commit="https://github.com/${GIT_UPSTREAM_USER}/RPi-Jukebox-RFID/releases/download/v${jukebox_version}/webapp-build-${git_head_hash}.tar.gz"
local download_url_latest="https://github.com/${GIT_UPSTREAM_USER}/RPi-Jukebox-RFID/releases/download/v${jukebox_version}/webapp-build-latest.tar.gz"

cd "${INSTALLATION_PATH}/src/webapp" || exit_on_error
if validate_url ${download_url_commit} ; then
log " DOWNLOAD_URL ${download_url_commit}"
download_from_url ${download_url_commit} ${tar_filename}
else [[ $ENABLE_WEBAPP_PROD_DOWNLOAD == true ]] && validate_url ${download_url_latest}
else [[ $ENABLE_WEBAPP_PROD_DOWNLOAD == true ]] && validate_url ${download_url_latest}
log " DOWNLOAD_URL ${download_url_latest}"
download_from_url ${download_url_latest} ${tar_filename}
else
Expand Down

0 comments on commit 2f57174

Please sign in to comment.