mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
support auto updating more packages
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "adwaita++-icons"
|
||||
REPO = "Bonandry/adwaita-plus"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,23 @@
|
||||
import requests
|
||||
import re
|
||||
import os
|
||||
|
||||
|
||||
NAME = "openasar-canary"
|
||||
REPO = "GooseMod/OpenAsar"
|
||||
REGEX_SHA = r"%define commit (.+)"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/commits/HEAD"
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
sha = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()["sha"]
|
||||
f = open(SPEC, "r")
|
||||
|
||||
matches = re.findall(REGEX_SHA, txt := f.read())
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
|
||||
if sha == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
print(f"{NAME}: {cur} -> {sha}")
|
||||
@@ -1,3 +1,5 @@
|
||||
%define commit ad9b161744b27acc5e333ee70df11afca09301ef
|
||||
|
||||
Name: openasar-canary
|
||||
Version: nightly.%{autogitdate}
|
||||
Release: 1%{?dist}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "budgie-extras"
|
||||
REPO = "UbuntuBudgie/budgie-extras"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "moby-buildx"
|
||||
REPO = "docker/buildx"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "moby-compose"
|
||||
REPO = "docker/compose"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "bat-extras"
|
||||
REPO = "eth-p/bat-extras"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "pop-launcher"
|
||||
REPO = "pop-os/launcher"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "rust-sccache"
|
||||
REPO = "mozilla/sccache"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "youki"
|
||||
REPO = "containers/youki"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "rust-zellij"
|
||||
REPO = "zellij-org/zellij"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "appimagelauncher"
|
||||
REPO = "TheAssassin/AppImageLauncher"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = "gcm-core"
|
||||
REPO = "GitCredentialManager/git-credential-manager"
|
||||
REGEX_VER = r"Version:\s*([\.\d]+)\n"
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f"https://api.github.com/repos/{REPO}/releases/latest"
|
||||
|
||||
|
||||
token = os.getenv("GITHUB_TOKEN")
|
||||
ver = requests.get(LINK, headers={"Authorization": f"Bearer {token}"}).json()[
|
||||
"tag_name"
|
||||
][1:]
|
||||
|
||||
with open(SPEC, "r") as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
|
||||
if not len(matches):
|
||||
exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur:
|
||||
exit(f"{NAME}: Up to date!")
|
||||
|
||||
print(f"{NAME}: {cur} -> {ver}")
|
||||
os.system(f"rpmdev-bumpspec -n {ver} {SPEC}")
|
||||
Reference in New Issue
Block a user