Skip to content

Commit

Permalink
Merge pull request #17 from Knowit-Objectnet/fixup/touch-version-file
Browse files Browse the repository at this point in the history
FIXUP: Touch VERSION file and change permissions
  • Loading branch information
choffa committed Jun 5, 2024
2 parents e608497 + 5b782e1 commit e626a69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Build and tar
run: |
cargo zigbuild --target armv7-unknown-linux-gnueabihf --release
chmod +x ./target/armv7-unknown-linux-gnueabihf/release/infoskjerm
chmod 777 ./target/armv7-unknown-linux-gnueabihf/release/infoskjerm
tar -czvf infoskjerm.tar.gz update.py \
-C ./target/armv7-unknown-linux-gnueabihf/release infoskjerm
Expand Down
6 changes: 5 additions & 1 deletion update.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import subprocess
import tarfile

from pathlib import Path

# Step 1: Get the latest release JSON
response = requests.get(
"https://api.github.com/repos/Knowit-Objectnet/infoskjerm-trondheim/releases/latest")
Expand All @@ -16,7 +18,9 @@
print(f"Downloaded version: {version}")

# Check against running version
with open("VERSION", "w+") as file:
p = Path("VERSION")
p.touch()
with open(p, "r") as file:
if version == file.read():
print("No new version")
exit(0)
Expand Down

0 comments on commit e626a69

Please sign in to comment.