commit ca17686bec02744328ed605ed9a092ab7b2e7883
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Fri Jun 14 00:56:49 2024 +0100
Update to 0.0.56
check_new_version.py | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
discord.spec | 5 ++++-
sources | 2 +-
3 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/check_new_version.py b/check_new_version.py
new file mode 100755
index 0000000..c43cca8
--- /dev/null
+++ b/check_new_version.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python3
+
+""" Warning not complete """
+
+import requests
+import re
+import os
+import subprocess
+
+def runme(cmd, env, cwd='.'):
+ """Simple function to run a command and return 0 for success, 1 for
+ failure. cmd is a list of the command and arguments, action is a
+ name for the action (for logging), pkg is the name of the package
+ being operated on, env is the environment dict, and cwd is where
+ the script should be executed from."""
+ try:
+ subprocess.check_call(cmd, env=env, cwd=cwd, stderr=subprocess.PIPE)
+ except subprocess.CalledProcessError as e:
+ sys.stderr.write('%s failed: %s\n' % (cmd, e))
+ return 1
+ return 0
+
+spec_file = "discord.spec"
+
+h =
requests.head("https://discord.com/api/download/stable?platform=linu...
+print(h.headers.get("location"))
+minor64 = h.headers.get("location")
+version64 = minor64.split("/")[5]
+
+spec = open(spec_file).read()
+str_mx3 = re.compile(r'(Version:\s*) .*')
+spec3 = re.sub(str_mx3, r'\1 %s' % version64, spec)
+
+if spec != spec3:
+# open(spec_file, 'w').write(spec3)
+ enviro = os.environ
+ pkgcmd = ['rpmdev-bumpspec', '-n', version64, '-c',
'Update to %s' % (version64),
+ spec_file]
+ if runme(pkgcmd, enviro):
+ print('error running runme')
+
+ print("New version available!")
+ print('rfpkg mockbuild -N --default-mock-resultdir --root
fedora-38-x86_64-rpmfusion_nonfree')
+else:
+ print("Already updated !")
+
+print('spectool -g discord.spec')
+print(''' rfpkg new-sources $(spectool -l --sources discord.spec | grep https
| sed 's/.*: //;s/.*\///') ''')
+print('rfpkg ci -c && git show && echo Press enter to push and build;
read dummy; rfpkg push && rfpkg build --nowait')
+print('git checkout f40 && git merge master && git push &&
rfpkg build --nowait; git checkout master')
+print('git checkout f39 && git merge master && git push &&
rfpkg build --nowait; git checkout master')
+print('git checkout f38 && git merge master && git push &&
rfpkg build --nowait; git checkout master')
+print('git checkout el9 && git merge master && git push &&
rfpkg build --nowait; git checkout master')
+print('git checkout el8 && git merge master && git push &&
rfpkg build --nowait; git checkout master')
diff --git a/discord.spec b/discord.spec
index 9d5b86a..d4eeea4 100644
--- a/discord.spec
+++ b/discord.spec
@@ -6,7 +6,7 @@
%global __provides_exclude_from %{_libdir}/discord/.*\\.s
Name: discord
-Version: 0.0.54
+Version: 0.0.56
Release: 1%{?dist}
Summary: All-in-one voice and text chat
@@ -85,6 +85,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{name}.metain
%changelog
+* Thu Jun 13 2024 Sérgio Basto <sergio(a)serjux.com> - 0.0.56-1
+- Update to 0.0.56
+
* Fri May 17 2024 Leigh Scott <leigh123linux(a)gmail.com> - 0.0.54-1
- Update to 0.0.54
diff --git a/sources b/sources
index 2ee459c..6416b15 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (discord-0.0.54.tar.gz) =
ceb6265e846fafd27e3c2941f00f0a2d4e045abe5471a2691b070bedb330ef345edee838a706b27ff65ecce40aec46b1a1dd9c4bb9763dadaa907ec181c1a222
+SHA512 (discord-0.0.56.tar.gz) =
799d6cf5fcdeff83aaad20662668b17ff0cf88edab1bf404ad366340d0783269fef8800382a111f8505b353031c80cd17ab804a56f51f3c8bb2e2a2c5e6b86ec