Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Jan 21, 2025
1 parent 950d443 commit 4b998f9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions scripts/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
import os
import requests

release = requests.get('https://api.github.com/repos/lichess-org/broadcaster/releases/latest').json()
release = requests.get("https://api.github.com/repos/lichess-org/broadcaster/releases/latest").json()

signatures = {}
signatures['mac'] = requests.get('https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-macos.app.tar.gz.sig').text
signatures['linux'] = requests.get('https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-linux.AppImage.tar.gz.sig').text
signatures['windows'] = requests.get('https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-windows.msi.zip.sig').text
signatures["mac"] = requests.get("https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-macos.app.tar.gz.sig").text
signatures["linux"] = requests.get("https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-linux.AppImage.tar.gz.sig").text
signatures["windows"] = requests.get("https://github.com/lichess-org/broadcaster/releases/latest/download/Lichess-Broadcaster-windows.msi.zip.sig").text

version_file = os.path.join(os.path.dirname(__file__), '../updater/version.json')
version_file = os.path.join(os.path.dirname(__file__), "../updater/version.json")

with open(version_file) as f:
updater = json.load(f)

updater['version'] = release['tag_name']
updater['pub_date'] = release['published_at']
updater["version"] = release["tag_name"]
updater["pub_date"] = release["published_at"]

updater['platforms']['darwin-x86_64']['signature'] = signatures['mac']
updater['platforms']['darwin-aarch64']['signature'] = signatures['mac']
updater['platforms']['linux-x86_64']['signature'] = signatures['linux']
updater['platforms']['windows-x86_64']['signature'] = signatures['windows']
updater["platforms"]["darwin-x86_64"]["signature"] = signatures["mac"]
updater["platforms"]["darwin-aarch64"]["signature"] = signatures["mac"]
updater["platforms"]["linux-x86_64"]["signature"] = signatures["linux"]
updater["platforms"]["windows-x86_64"]["signature"] = signatures["windows"]

with open(version_file, 'w') as f:
with open(version_file, "w") as f:
json.dump(updater, f, indent=2)
f.write('\n')
f.write("\n")

0 comments on commit 4b998f9

Please sign in to comment.