Unverified Commit d5625435 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

fcitx5: fix updateScript (#504332)

parents b2a6b072 b163ec77
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -23,21 +23,26 @@ REPOS = [
        ( "fcitx", "fcitx5-table-extra" ),
        ( "fcitx", "fcitx5-table-other" ),
        ( "fcitx", "fcitx5-unikey" ),
        ( "fcitx", "fcitx5-unikey" )
        ( "fcitx", "fcitx5-unikey" ),

        ( "ray2501", "fcitx5-array" )
        ]

OWNER = "fcitx"
QT_REPOS = [
        "fcitx5-chinese-addons",
        "fcitx5-configtool",
        "fcitx5-qt",
        "fcitx5-unikey",
        ]

def get_latest_tag(repo, owner=OWNER):
def get_latest_tag(repo, owner):
    r = requests.get('https://api.github.com/repos/{}/{}/tags'.format(owner,repo))
    return r.json()[0].get("name")

def main():
    for (owner, repo) in REPOS:
        rev = get_latest_tag(repo, owner)
        if repo == "fcitx5-qt":
        if repo in QT_REPOS:
            subprocess.run(["nix-update", "--commit", "--version", rev, "qt6Packages.{}".format(repo)])
        else:
            subprocess.run(["nix-update", "--commit", "--version", rev, repo])