Skip to content

Commit

Permalink
moved ts urls to phvalheim-static.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmiller committed Apr 10, 2024
1 parent fa6f202 commit 913920c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions container/engine/includes/0-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function updateSteam(){
#$1=world name
function InstallAndUpdateBepInEx() {
worldName="$1"
response=$(curl -sfSL -H "accept: application/json" "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/")
response=$(curl -sfSL -H "accept: application/json" "$tsJsonBepInExUrl")
download_url=$(jq -r ".latest.download_url" <<< "$response")
latest_version=$(jq -r ".latest.version_number" <<< "$response")
installed_version=$(cat /opt/stateful/games/valheim/worlds/$worldName/game/bepinex_version.txt 2> /dev/null)
Expand Down Expand Up @@ -244,7 +244,7 @@ function downloadAndInstallTsModsForWorld(){
echo "`date` [phvalheim] UUID: $worldMod"
echo "`date` [phvalheim] Latest Version: $modVersionLatest"

modDownloadUrl="https://valheim.thunderstore.io/package/download/$modAuthor/$modName/$modVersionLatest"
modDownloadUrl="$tsModDownloadUrl/$modAuthor/$modName/$modVersionLatest"
echo "`date` [phvalheim] Download URL: $modDownloadUrl"

modFileConstructed="$modAuthor-$modName-$modVersionLatest.zip"
Expand Down
3 changes: 3 additions & 0 deletions container/engine/includes/phvalheim-static.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ tsModsDir="/opt/stateful/games/valheim/mods/ts"
tsWIP="/opt/stateless/engine/tools/ts_wip"
worldSupervisorConfigs="/opt/stateful/games/supervisor/conf.d"
backupDir="/opt/stateful/backups"
tsApiUrl="https://thunderstore.io/c/valheim/api/v1/package/"
tsModDownloadUrl="https://thunderstore.io/package/download"
tsJsonBepInExUrl="https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/"

# Required mods for all worlds. These mods will be installed during world creation and world updates.
# PhValheimCompanion(e79de194-320c-4803-82b2-ffec9fbb0405)
Expand Down
2 changes: 1 addition & 1 deletion container/engine/tools/tsSyncLocalParse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

#echo
echo "`date` [NOTICE : phvalheim] Downloading Thunderstore's Valheim database..."
curl -s -X GET "https://thunderstore.io/c/valheim/api/v1/package/" -H "accept: application/json" |jq '.[]' > $tsWIP/json
curl -s -X GET "$tsApiUrl" -H "accept: application/json" |jq '.[]' > $tsWIP/json
errorSetter $?


Expand Down
10 changes: 5 additions & 5 deletions dev_tools/save_dockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ if [ ! $1 ]; then
exit 1
fi

podman login --username=theoriginalbrian docker.io
docker login --username=theoriginalbrian docker.io
#podman build --format=docker -t theoriginalbrian/phvalheim-server .

if [ "$1" = "latest" ]; then
podman build --format=docker -t theoriginalbrian/phvalheim-server:latest .
podman push theoriginalbrian/phvalheim-server:latest
docker build -t theoriginalbrian/phvalheim-server:latest .
docker push theoriginalbrian/phvalheim-server:latest
elif [ "$1" = "rc" ]; then
podman build --format=docker -t theoriginalbrian/phvalheim-server:rc .
podman push theoriginalbrian/phvalheim-server:rc
docker build -t theoriginalbrian/phvalheim-server:rc .
docker push theoriginalbrian/phvalheim-server:rc
fi

0 comments on commit 913920c

Please sign in to comment.