From f84c99f3fe980b2c5a74a75bec1c278965caf107 Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Sun, 27 Nov 2022 16:26:52 +0800 Subject: [PATCH] Update authy; Fix chkupdate --- anda/apps/authy/authy.spec | 2 +- anda/apps/authy/chkupdate.py | 2 +- .../elementary/editorconfig/chkupdate.py | 2 +- .../elementary/elementary-tasks/anda.hcl | 6 -- .../elementary/elementary-tasks/chkupdate.py | 19 ----- .../elementary-tasks/elementary-tasks.spec | 82 ------------------- .../impallari-raleway-fonts/chkupdate.py | 19 ----- 7 files changed, 3 insertions(+), 129 deletions(-) delete mode 100644 anda/desktops/elementary/elementary-tasks/anda.hcl delete mode 100644 anda/desktops/elementary/elementary-tasks/chkupdate.py delete mode 100644 anda/desktops/elementary/elementary-tasks/elementary-tasks.spec delete mode 100644 anda/fonts/impallari-raleway-fonts/chkupdate.py diff --git a/anda/apps/authy/authy.spec b/anda/apps/authy/authy.spec index c0465480cc..325a343dc3 100644 --- a/anda/apps/authy/authy.spec +++ b/anda/apps/authy/authy.spec @@ -1,5 +1,5 @@ Name: authy -Version: 2.2.1 +Version: 2.2.2 Release: 2%{?dist} Summary: Two factor authentication desktop application License: Unknown diff --git a/anda/apps/authy/chkupdate.py b/anda/apps/authy/chkupdate.py index 8a2eaa55cf..8d087b1817 100644 --- a/anda/apps/authy/chkupdate.py +++ b/anda/apps/authy/chkupdate.py @@ -32,7 +32,7 @@ except IndexError or AssertionError: link = data['channel-map'][0]['download']['url'] newspec = re.sub(REGEX_VER, f'Version:{found[0][0]}{ver}\n', content) -newspec = re.sub(REGEX_SRC, f'Source0:{found[0][0]}{link}\n', content) +newspec = re.sub(REGEX_SRC, f'Source0:{found[0][0]}{link}\n', newspec) f.close() f = open(SPEC, 'w') f.write(newspec) diff --git a/anda/desktops/elementary/editorconfig/chkupdate.py b/anda/desktops/elementary/editorconfig/chkupdate.py index bd97c85460..42f4599a41 100644 --- a/anda/desktops/elementary/editorconfig/chkupdate.py +++ b/anda/desktops/elementary/editorconfig/chkupdate.py @@ -3,7 +3,7 @@ import requests import re NAME = 'editorconfig' -REPO = "elementary/editorconfig-core-c" +REPO = "editorconfig/editorconfig-core-c" REGEX_VER = r'Version:\s*([\.\d]+)\n' SPEC = f"{NAME}.spec" LINK = f'https://api.github.com/repos/{REPO}/releases/latest' diff --git a/anda/desktops/elementary/elementary-tasks/anda.hcl b/anda/desktops/elementary/elementary-tasks/anda.hcl deleted file mode 100644 index 7808718adb..0000000000 --- a/anda/desktops/elementary/elementary-tasks/anda.hcl +++ /dev/null @@ -1,6 +0,0 @@ -project "pkg" { - rpm { - spec = "elementary-tasks.spec" - sources = "." - } -} diff --git a/anda/desktops/elementary/elementary-tasks/chkupdate.py b/anda/desktops/elementary/elementary-tasks/chkupdate.py deleted file mode 100644 index d764caf737..0000000000 --- a/anda/desktops/elementary/elementary-tasks/chkupdate.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import requests -import re - -NAME = 'elementary-tasks' -REPO = "elementary/tasks" -REGEX_VER = r'Version:\s*([\.\d]+)\n' -SPEC = f"{NAME}.spec" -LINK = f'https://api.github.com/repos/{REPO}/releases/latest' - - -ver = requests.get(LINK, headers={'Authorization': 'Bearer ' + os.getenv('GITHUB_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}') diff --git a/anda/desktops/elementary/elementary-tasks/elementary-tasks.spec b/anda/desktops/elementary/elementary-tasks/elementary-tasks.spec deleted file mode 100644 index b565fd987a..0000000000 --- a/anda/desktops/elementary/elementary-tasks/elementary-tasks.spec +++ /dev/null @@ -1,82 +0,0 @@ -%global srcname tasks -%global appname io.elementary.tasks - -Name: elementary-tasks -Summary: Synced tasks and reminders application -Version: 6.3.1 -Release: %autorelease -License: GPLv3+ - -URL: https://github.com/elementary/tasks -Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz - -BuildRequires: desktop-file-utils -BuildRequires: gettext -BuildRequires: libappstream-glib -BuildRequires: meson >= 0.49 -BuildRequires: vala - -BuildRequires: pkgconfig(champlain-0.12) -BuildRequires: pkgconfig(champlain-gtk-0.12) -BuildRequires: pkgconfig(clutter-1.0) -BuildRequires: pkgconfig(clutter-gtk-1.0) -BuildRequires: pkgconfig(geocode-glib-1.0) -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: pkgconfig(granite) >= 6.2.0 -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(libedataserver-1.2) = 3.44.4 -BuildRequires: pkgconfig(libgdata) -BuildRequires: pkgconfig(libgeoclue-2.0) -BuildRequires: pkgconfig(libhandy-1) >= 0.90.0 -BuildRequires: pkgconfig(libical-glib) - -Requires: hicolor-icon-theme - -%description -%{summary}. - - -%prep -%autosetup -n %{srcname}-%{version} -p1 - - -%build -%meson -%meson_build - - -%install -%meson_install - -%find_lang %{appname} - - -%check -desktop-file-validate \ - %{buildroot}/%{_datadir}/applications/%{appname}.desktop - -desktop-file-validate \ - %{buildroot}/%{_sysconfdir}/xdg/autostart/%{appname}-daemon.desktop - -appstream-util validate-relax --nonet \ - %{buildroot}/%{_datadir}/metainfo/%{appname}.appdata.xml - - -%files -f %{appname}.lang -%license LICENSE -%doc README.md - -%config(noreplace) %{_sysconfdir}/xdg/autostart/%{appname}-daemon.desktop - -%{_bindir}/%{appname} - -%{_datadir}/applications/%{appname}.desktop -%{_datadir}/glib-2.0/schemas/%{appname}.gschema.xml -%{_datadir}/icons/hicolor/*/apps/%{appname}.svg -%{_datadir}/metainfo/%{appname}.appdata.xml - - -%changelog -* Sat Oct 15 2022 windowsboy111 -- Repackaged for Terra diff --git a/anda/fonts/impallari-raleway-fonts/chkupdate.py b/anda/fonts/impallari-raleway-fonts/chkupdate.py deleted file mode 100644 index 3c02e70f37..0000000000 --- a/anda/fonts/impallari-raleway-fonts/chkupdate.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import requests -import re - -NAME = 'impallari-raleway-fonts' -REPO = "alexeiva/Raleway" -REGEX_VER = r'Version:\s*([\.\d]+)\n' -SPEC = f"{NAME}.spec" -LINK = f'https://api.github.com/repos/{REPO}/releases/latest' - - -ver = requests.get(LINK, headers={'Authorization': 'Bearer ' + os.getenv('GITHUB_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}')