From 696a95fcb2ae14a23b01cc2587eaffe50ffc0b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Gj=C3=B8v=C3=A5g?= Date: Wed, 2 Oct 2024 14:27:18 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Legger=20til=20chmod=20777=20p=C3=A5=20upda?= =?UTF-8?q?te=20script=20slik=20at=20det=20kan=20skrive=20seg=20selv=20ute?= =?UTF-8?q?n=20sudo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_and_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index d202058..79d13b5 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -66,6 +66,7 @@ jobs: run: | cargo zigbuild --target armv7-unknown-linux-gnueabihf --release chmod 777 ./target/armv7-unknown-linux-gnueabihf/release/infoskjerm + chmod 777 update.py tar -czvf infoskjerm.tar.gz update.py \ -C ./target/armv7-unknown-linux-gnueabihf/release infoskjerm From 552753f20e2eabe2dfa9af441d07ad481731d1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Gj=C3=B8v=C3=A5g?= Date: Wed, 2 Oct 2024 14:27:55 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Endre=20rekkef=C3=B8lge=20slik=20at=20den?= =?UTF-8?q?=20ikke=20skriver=20til=20VERSION=20f=C3=B8r=20den=20faktisk=20?= =?UTF-8?q?kj=C3=B8rer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/update.py b/update.py index 8232f43..c7a0efa 100755 --- a/update.py +++ b/update.py @@ -51,9 +51,13 @@ with tarfile.open(fileobj=tarlike, mode="r:gz") as tar: tar.extractall() -# Step 5: Update running version +# Step 5: Run the run.sh script +res = subprocess.run(["sh", "run.sh"]) + +if res.returncode != 0: + print("Could not start infoskjerm") + exit(1) + +# Step 6: Update running version with open("VERSION", "w+") as file: file.write(version) - -# Step 6: Run the run.sh script -subprocess.run(["sh", "run.sh"])