Skip to content

Commit

Permalink
Updated update.sh and clear data from broken github action! (#505)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
MrBasicX authored Oct 21, 2024
1 parent 890489f commit a1cb15b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions buildinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit a1cb15b

Please sign in to comment.