File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,6 @@ function update_script() {
5050
5151 BACKUP_DIR=" /opt/bifrost-backup-$( date +%Y%m%d-%H%M%S) " create_backup /opt/bifrost_data /opt/bifrost/bifrost-http ~ /.bifrost
5252
53- CLEAN_INSTALL=1 fetch_and_deploy_gh_release " bifrost" " maximhq/bifrost" " tarball" " $CHECK_UPDATE_RELEASE "
54-
5553 msg_info " Installing Bifrost Gateway"
5654 install -m 755 /opt/bifrost-update/bifrost-http /opt/bifrost/bifrost-http
5755 cd /opt/bifrost || exit 1
@@ -62,8 +60,16 @@ function update_script() {
6260 systemctl start bifrost
6361 $STD curl --fail --silent --show-error --retry 30 --retry-connrefused --retry-delay 2 --retry-max-time 120 --max-time 5 http://127.0.0.1:8080/health
6462 systemctl is-active --quiet bifrost
63+ cat << EOF >~/.bifrost
64+ ${CHECK_UPDATE_RELEASE}
65+ EOF
6566 msg_ok " Started Bifrost"
6667 msg_ok " Updated Bifrost successfully!"
68+ else
69+ RELEASE_CHECK_STATUS=$?
70+ if [[ " $RELEASE_CHECK_STATUS " -ne 1 ]]; then
71+ exit " $RELEASE_CHECK_STATUS "
72+ fi
6773 fi
6874 exit
6975}
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ setting_up_container
1313network_check
1414update_os
1515
16- # The monorepo also releases SDKs and plugins; select only stable gateway releases.
17- fetch_and_deploy_gh_release " bifrost" " maximhq/bifrost" " tarball" " latest" " /opt/bifrost" " " " transports/v"
16+ # Gateway binaries live on the upstream CDN; GitHub also releases unrelated SDKs and plugins.
17+ if ! check_for_gh_release " bifrost" " maximhq/bifrost" " ${var_appversion:- } " " " " transports/v" ; then
18+ msg_error " Could not select a Bifrost gateway release"
19+ exit 1
20+ fi
1821
1922msg_info " Installing Bifrost Gateway"
20- BIFROST_VERSION=$( cat ~ /.bifrost)
21- BIFROST_URL=" https://downloads.getmaxim.ai/bifrost/${BIFROST_VERSION##*/ } /linux/$( arch_resolve) "
22- mkdir -p /opt/bifrost-update
23+ BIFROST_URL=" https://downloads.getmaxim.ai/bifrost/${CHECK_UPDATE_RELEASE##*/ } /linux/$( arch_resolve) "
24+ mkdir -p /opt/bifrost /opt/bifrost-update
2325chmod 700 /opt/bifrost-update
2426curl_with_retry " ${BIFROST_URL} /bifrost-http" /opt/bifrost-update/bifrost-http
2527curl_with_retry " ${BIFROST_URL} /bifrost-http.sha256" /opt/bifrost-update/bifrost-http.sha256
8183systemctl enable -q --now bifrost
8284$STD curl --fail --silent --show-error --retry 30 --retry-connrefused --retry-delay 2 --retry-max-time 120 --max-time 5 http://127.0.0.1:8080/health
8385systemctl is-active --quiet bifrost
86+ cat << EOF >~/.bifrost
87+ ${CHECK_UPDATE_RELEASE}
88+ EOF
8489msg_ok " Created Bifrost Service"
8590
8691motd_ssh
You can’t perform that action at this time.
0 commit comments