mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-10 20:01:54 +01:00
Merge branch 'develop'
This commit is contained in:
commit
395ca92f6e
5 changed files with 15 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
4.2.6 - 03/11/2022
|
||||||
|
Fixed:
|
||||||
|
- Check for the file ChangeLog.txt
|
||||||
|
|
||||||
4.2.5 - 01/11/2022
|
4.2.5 - 01/11/2022
|
||||||
Added:
|
Added:
|
||||||
- Command to check if there is news on ChangeLog.txt
|
- Command to check if there is news on ChangeLog.txt
|
||||||
|
|
|
@ -30,8 +30,8 @@ Install from the official third-party `SBo repository <https://slackbuilds.org/r
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tar xvf slpkg-4.2.5.tar.gz
|
$ tar xvf slpkg-4.2.6.tar.gz
|
||||||
$ cd slpkg-4.2.5
|
$ cd slpkg-4.2.6
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = slpkg
|
name = slpkg
|
||||||
version = 4.2.5
|
version = 4.2.6
|
||||||
license_file = LICENSE
|
license_file = LICENSE
|
||||||
author = Dimitris Zlatanidis
|
author = Dimitris Zlatanidis
|
||||||
author_email = d.zlatanidis@gmail.com
|
author_email = d.zlatanidis@gmail.com
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
import urllib3
|
import urllib3
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
@ -16,8 +17,10 @@ class CheckUpdates:
|
||||||
|
|
||||||
def updates(self):
|
def updates(self):
|
||||||
|
|
||||||
|
local_date = ''
|
||||||
local_chg_txt = f'{self.sbo_repo_path}/{self.chglog_txt}'
|
local_chg_txt = f'{self.sbo_repo_path}/{self.chglog_txt}'
|
||||||
|
|
||||||
|
if os.path.isfile(local_chg_txt):
|
||||||
with open(local_chg_txt, 'r', encoding='utf-8') as f:
|
with open(local_chg_txt, 'r', encoding='utf-8') as f:
|
||||||
local_date = f.readline().strip()
|
local_date = f.readline().strip()
|
||||||
|
|
||||||
|
@ -25,7 +28,8 @@ class CheckUpdates:
|
||||||
repo = http.request(
|
repo = http.request(
|
||||||
'GET', f'{self.sbo_repo_url}/{self.chglog_txt}')
|
'GET', f'{self.sbo_repo_url}/{self.chglog_txt}')
|
||||||
|
|
||||||
repo_date = repo.data.decode().split('\\')[0][:len(local_date)]
|
repo_date = repo.data.decode().split('\\')[0][:len(local_date)].strip()
|
||||||
|
|
||||||
if repo_date > local_date:
|
if repo_date > local_date:
|
||||||
print('\nThere are new updates available.\n')
|
print('\nThere are new updates available.\n')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -10,7 +10,7 @@ from slpkg.configs import Configs
|
||||||
@dataclass
|
@dataclass
|
||||||
class Version:
|
class Version:
|
||||||
prog_name: str = Configs.prog_name
|
prog_name: str = Configs.prog_name
|
||||||
version_info: tuple = (4, 2, 5)
|
version_info: tuple = (4, 2, 6)
|
||||||
version: str = '{0}.{1}.{2}'.format(*version_info)
|
version: str = '{0}.{1}.{2}'.format(*version_info)
|
||||||
license: str = 'MIT License'
|
license: str = 'MIT License'
|
||||||
author: str = 'dslackw'
|
author: str = 'dslackw'
|
||||||
|
|
Loading…
Reference in a new issue