From a1cb15b70932b08db6299871b3152e0cc618e8b9 Mon Sep 17 00:00:00 2001 From: Mr BasicX <114404222+MrBasicX@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:21:42 +0530 Subject: [PATCH] Updated update.sh and clear data from broken github action! (#505) * Update update.sh to fix SHA256 grabbing * Update buildinfo.json reverted data so build.sh can run * Update docker-compose.yml reverted data so build.sh can run --- buildinfo.json | 13 ++----------- docker/docker-compose.yml | 4 ++-- update.sh | 4 ++-- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/buildinfo.json b/buildinfo.json index 94464378..6737addf 100644 --- a/buildinfo.json +++ b/buildinfo.json @@ -51,21 +51,12 @@ "1.1.110": { "sha256": "485fe6db36e5decd7dd0d70e7c97e61f818100fa3e48d87884b287027c7a646a", "tags": [ + "latest", + "stable", "stable-1.1.110", "1", "1.1", "1.1.110" ] - }, - "2.0.7": { - "sha256": "", - "tags": [ - "latest", - "stable", - "stable-2.0.7", - "2", - "2.0", - "2.0.7" - ] } } diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index cb3ae473..9d6a6802 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,8 +6,8 @@ services: args: # Check buildinfo.json for supported versions and SHAs # https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json - - VERSION=2.0.7 - - SHA256= + - VERSION=1.1.110 + - SHA256=485fe6db36e5decd7dd0d70e7c97e61f818100fa3e48d87884b287027c7a646a ports: - "34197:34197/udp" - "27015:27015/tcp" diff --git a/update.sh b/update.sh index 45a16ab5..bed39bcd 100755 --- a/update.sh +++ b/update.sh @@ -4,8 +4,8 @@ SEMVER_REGEX="^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$" stable_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.stable.headless' -r) experimental_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.experimental.headless' -r) -stable_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep "factorio_headless_x64_${stable_online_version}.tar.xz" | awk '{print $1}') -experimental_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep "factorio_headless_x64_${experimental_online_version}.tar.xz" | awk '{print $1}') +stable_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${stable_online_version}.tar.xz" | awk '{print $1}') +experimental_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${experimental_online_version}.tar.xz" | awk '{print $1}') stable_current_version=$(jq 'with_entries(select(contains({value:{tags:["stable"]}}))) | keys | .[0]' buildinfo.json -r) latest_current_version=$(jq 'with_entries(select(contains({value:{tags:["latest"]}}))) | keys | .[0]' buildinfo.json -r) echo "stable_online_version=${stable_online_version} experimental_online_version=${experimental_online_version}"