Typo in README

This commit is contained in:
Cyrille L 2024-09-18 11:09:46 +02:00
parent 3408cfd03a
commit abafbf3d55
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ This tool is used to check - with a set registred project - for:
- available online latest 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.
It is configured here for "mastodon" project, but you can copy and use it,

View File

@ -42,8 +42,10 @@ import requests, subprocess, sys
#------------
owner = "mastodon" # Also used for sudo -u {owner}
name = "mastodon"
repo = f"https://api.github.com/repos/{owner}/{name}/releases/latest"
# VLH (Very Little Help)
helps = """Usage: has_update [argument]
-h : This help !
-v : Show both versions (online, and installed)
@ -53,8 +55,7 @@ helps = """Usage: has_update [argument]
# Check available version using Git API with requests #
#-----------------------------------------------------#
def get_available_release():
url = f"https://api.github.com/repos/{owner}/{name}/releases/latest"
response = requests.get(url)
response = requests.get(repo)
if response.status_code == 200:
latest_release = response.json()
return latest_release['tag_name']