mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 04:13:01 +00:00
0b8f6029b6
Add python update script which parses latest version from atom feed and calls `update-source-version`. Additionally set meta.changelog url. Tested with `nix-shell maintainers/scripts/update.nix --argstr package lunatask`.
19 lines
487 B
Python
Executable File
19 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)
|