depot/third_party/nixpkgs/pkgs/applications/misc/lunatask/update.py
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

18 lines
487 B
Python
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -i python --packages python3 python3Packages.feedparser common-updater-scripts
"""
Parses the latest version from atom feed and runs update-source-version
"""
import subprocess
import feedparser
URL = "https://lunatask.app/releases/atom.xml"
feed = feedparser.parse(URL)
latest_entry = feed.entries[0]
latest_version = latest_entry.title.split()[-1].lstrip("v")
subprocess.run(["update-source-version", "lunatask", latest_version], check=True)