Skip to content

Commit

Permalink
Merge pull request #23 from Knowit-Objectnet/fixup/fiks-automatisk-op…
Browse files Browse the repository at this point in the history
…pdatering

fixup/fiks automatisk oppdatering
  • Loading branch information
choffa authored Oct 2, 2024
2 parents 69d8c75 + 552753f commit 127d192
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

0 comments on commit 127d192

Please sign in to comment.