Typo in README
This commit is contained in:
parent
3408cfd03a
commit
abafbf3d55
|
@ -5,7 +5,7 @@ This tool is used to check - with a set registred project - for:
|
||||||
- available online latest version
|
- available online latest version
|
||||||
- current installed version
|
- current installed version
|
||||||
|
|
||||||
This tool, writtent in python and under GPLv3 Licence assumes project is
|
This tool, written in python and under GPLv3 Licence assumes project is
|
||||||
installed using git in an admin project name owner on the system.
|
installed using git in an admin project name owner on the system.
|
||||||
|
|
||||||
It is configured here for "mastodon" project, but you can copy and use it,
|
It is configured here for "mastodon" project, but you can copy and use it,
|
||||||
|
|
|
@ -42,8 +42,10 @@ import requests, subprocess, sys
|
||||||
#------------
|
#------------
|
||||||
owner = "mastodon" # Also used for sudo -u {owner}
|
owner = "mastodon" # Also used for sudo -u {owner}
|
||||||
name = "mastodon"
|
name = "mastodon"
|
||||||
|
repo = f"https://api.github.com/repos/{owner}/{name}/releases/latest"
|
||||||
|
|
||||||
|
|
||||||
|
# VLH (Very Little Help)
|
||||||
helps = """Usage: has_update [argument]
|
helps = """Usage: has_update [argument]
|
||||||
-h : This help !
|
-h : This help !
|
||||||
-v : Show both versions (online, and installed)
|
-v : Show both versions (online, and installed)
|
||||||
|
@ -53,8 +55,7 @@ helps = """Usage: has_update [argument]
|
||||||
# Check available version using Git API with requests #
|
# Check available version using Git API with requests #
|
||||||
#-----------------------------------------------------#
|
#-----------------------------------------------------#
|
||||||
def get_available_release():
|
def get_available_release():
|
||||||
url = f"https://api.github.com/repos/{owner}/{name}/releases/latest"
|
response = requests.get(repo)
|
||||||
response = requests.get(url)
|
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
latest_release = response.json()
|
latest_release = response.json()
|
||||||
return latest_release['tag_name']
|
return latest_release['tag_name']
|
||||||
|
|
Loading…
Reference in New Issue