mirror of
https://github.com/CMiksche/gitea-auto-update
synced 2025-12-10 16:07:23 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3174f2783f | ||
|
|
aa6fc91826 | ||
|
|
98ddb8c119 | ||
|
|
caeee31bb4 | ||
|
|
324225e795 | ||
|
|
05caef9d41 | ||
|
|
8b64d5f518 | ||
|
|
56f128b2f7 | ||
|
|
d95f1aacb8 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
__pycache__
|
||||
.pyc
|
||||
.idea
|
||||
.idea
|
||||
Pipfile.lock
|
||||
@@ -4,6 +4,7 @@ python:
|
||||
- "3.7"
|
||||
cache: pip
|
||||
install:
|
||||
- pip install requests packaging
|
||||
- pip install pipenv
|
||||
- pipenv install
|
||||
script:
|
||||
- python tests.py
|
||||
|
||||
15
Pipfile
Normal file
15
Pipfile
Normal file
@@ -0,0 +1,15 @@
|
||||
[[source]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[packages]
|
||||
requests = "*"
|
||||
packaging = "*"
|
||||
fire = "*"
|
||||
configparser = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
||||
28
README.md
28
README.md
@@ -1,4 +1,4 @@
|
||||
# Gitea Auto Updater
|
||||
# Gitea Auto Update
|
||||
|
||||
[](https://travis-ci.org/CMiksche/gitea-auto-update)
|
||||
|
||||
@@ -28,19 +28,29 @@ Uses python version 3
|
||||
|
||||
## Installation
|
||||
|
||||
1. Use the following command to install all dependencies.
|
||||
Create a settings.ini file on your system. Example:
|
||||
|
||||
````
|
||||
[Gitea]
|
||||
site=https://your-gitea-instance.com/api/v1/version
|
||||
apiUrl=https://api.github.com/repos/go-gitea/gitea/releases/latest
|
||||
system=linux-amd64
|
||||
file=/usr/local/bin/gitea
|
||||
tmpDir=/tmp/
|
||||
buildFromSource=None
|
||||
sourceDir=/home/git/go/src/code.gitea.io/gitea
|
||||
logFile=update.log
|
||||
````
|
||||
|
||||
Use the following command to install all gitea-auto-update.
|
||||
|
||||
```
|
||||
sudo pip install requests packaging
|
||||
sudo pip install gitea-auto-update
|
||||
```
|
||||
|
||||
2. Then clone the git repository.
|
||||
Enter the command `gite-auto-update --settings=/path/to/settings.ini` in your commandline.
|
||||
|
||||
3. After that, please change the variables in the settings.py file.
|
||||
|
||||
4. Enter the command `python updater.py` in your commandline.
|
||||
|
||||
5. If you want to schedule your updates, edit your /etc/crontab file.
|
||||
If you want to schedule your updates, edit your /etc/crontab file.
|
||||
|
||||
## Tutorials
|
||||
|
||||
|
||||
71
functions.py
71
functions.py
@@ -1,71 +0,0 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import settings
|
||||
import requests
|
||||
import os
|
||||
|
||||
# Function to download a file
|
||||
def download(url, file_name):
|
||||
# open in binary mode
|
||||
with open(file_name, "wb") as file:
|
||||
# get request
|
||||
response = requests.get(url)
|
||||
# write to file
|
||||
file.write(response.content)
|
||||
|
||||
# Function to build the new version from source
|
||||
def buildFromSource(tag):
|
||||
# Change to source dir
|
||||
os.chdir(settings.source_dir)
|
||||
# Checkout master
|
||||
os.system("git checkout master")
|
||||
# Update
|
||||
os.system("git pull")
|
||||
# Checkout relase branch
|
||||
os.system("git checkout "+tag)
|
||||
# Build from source
|
||||
os.system('TAGS="bindata sqlite sqlite_unlock_notify" make generate build')
|
||||
# Move binary
|
||||
os.system("mv gitea "+settings.gtfile)
|
||||
|
||||
# Function to check if there is a new version
|
||||
def checkVersion(new_version, old_version):
|
||||
|
||||
from packaging import version
|
||||
|
||||
return version.parse(new_version) > version.parse(old_version)
|
||||
|
||||
# Function to check if tool is available
|
||||
def is_tool(name):
|
||||
##Check whether `name` is on PATH and marked as executable.
|
||||
|
||||
# from whichcraft import which
|
||||
from shutil import which
|
||||
|
||||
return which(name) is not None
|
||||
|
||||
def parseFileVersion(string):
|
||||
return string.split(" ")[2]
|
||||
|
||||
def getVersionFromFile():
|
||||
version_string = os.popen(settings.gtfile+" -v").read()
|
||||
return parseFileVersion(version_string)
|
||||
|
||||
# Function to get the current version
|
||||
def getCurrentVersion():
|
||||
try:
|
||||
# Try to get the version from the file
|
||||
current_version = getVersionFromFile()
|
||||
except:
|
||||
# Get the version via the web api if the file does fail
|
||||
current_version = requests.get(settings.gtsite).json()['version']
|
||||
if current_version.status_code != 200:
|
||||
current_version = getVersionFromFile()
|
||||
finally:
|
||||
return current_version
|
||||
0
gitea_auto_update/__init__.py
Normal file
0
gitea_auto_update/__init__.py
Normal file
0
gitea_auto_update/lib/__init__.py
Normal file
0
gitea_auto_update/lib/__init__.py
Normal file
24
gitea_auto_update/lib/build.py
Normal file
24
gitea_auto_update/lib/build.py
Normal file
@@ -0,0 +1,24 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import os
|
||||
|
||||
class Build:
|
||||
|
||||
def __init__(self, gtFile, sourceDir):
|
||||
self.gtFile = gtFile
|
||||
self.sourceDir = sourceDir
|
||||
|
||||
def fromSource(self, tag):
|
||||
# Function to build the new version from source
|
||||
os.chdir(self.sourceDir)
|
||||
os.system("git checkout master")
|
||||
os.system("git pull")
|
||||
os.system("git checkout " + tag)
|
||||
os.system('TAGS="bindata sqlite sqlite_unlock_notify" make generate build')
|
||||
os.system("mv gitea " + self.gtFile)
|
||||
77
gitea_auto_update/lib/download.py
Normal file
77
gitea_auto_update/lib/download.py
Normal file
@@ -0,0 +1,77 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import requests
|
||||
import os
|
||||
import logging
|
||||
from shutil import which # from whichcraft import which
|
||||
|
||||
|
||||
class Download:
|
||||
|
||||
def __init__(self, tmpDir, githubVersion, githubVersionTag, gtSystem, gtFile):
|
||||
if not self.isTool("xz"):
|
||||
logging.error('Download: missing dependency: xz')
|
||||
quit()
|
||||
|
||||
self.tmpDir = tmpDir
|
||||
self.githubVersion = githubVersion
|
||||
self.githubVersionTag = githubVersionTag
|
||||
self.gtSystem = gtSystem
|
||||
self.gtFile = gtFile
|
||||
|
||||
self.downloadGiteaFiles()
|
||||
self.checkAndExtract()
|
||||
|
||||
def isTool(name):
|
||||
# Function to check if tool is available
|
||||
##Check whether `name` is on PATH and marked as executable.
|
||||
return which(name) is not None
|
||||
|
||||
def download(self, url, fileName):
|
||||
# Function to download a file
|
||||
# open in binary mode
|
||||
with open(fileName, "wb") as file:
|
||||
# get request
|
||||
response = requests.get(url)
|
||||
# write to file
|
||||
file.write(response.content)
|
||||
|
||||
def downloadGiteaFiles(self):
|
||||
# Set download url
|
||||
gtDownload = 'https://github.com/go-gitea/gitea/releases/download/' + self.githubVersionTag + '/gitea-' + self.githubVersion + '-' + self.gtSystem + '.xz'
|
||||
logging.info('Download: Gitea file: %s', gtDownload)
|
||||
shaDownload = gtDownload + '.sha256'
|
||||
logging.info('Download: SHA file: %s', shaDownload)
|
||||
|
||||
# Download file
|
||||
logging.info('Download: downloading sha256 hashsum')
|
||||
self.download(shaDownload, self.tmpDir + 'gitea.xz.sha256')
|
||||
logging.info('Download: downloading %s', self.githubVersionTag + 'gitea.xz')
|
||||
self.tmpXz = self.tmpDir +'gitea-' + self.githubVersion + '-' + self.gtSystem + '.xz'
|
||||
self.download(gtDownload, self.tmpXz)
|
||||
|
||||
def shaCheck(self):
|
||||
return os.system("sha256sum -c gitea.xz.sha256 > /dev/null") == 0
|
||||
|
||||
def extractFile(self):
|
||||
logging.info('Download: sha ok, extracting file to location')
|
||||
# extracting download file
|
||||
cmd = "xz -d " + self.tmpXz
|
||||
os.system(cmd)
|
||||
# moving temp file to gtfile location
|
||||
cmd = 'mv ' + self.tmpDir + 'gitea-' + self.githubVersion + '-' + self.gtSystem + ' ' + self.gtFile
|
||||
os.system(cmd)
|
||||
|
||||
def checkAndExtract(self):
|
||||
os.chdir(self.tmpDir)
|
||||
if self.shaCheck():
|
||||
self.extractFile()
|
||||
else:
|
||||
logging.error('Download: error: sha256sum failed')
|
||||
quit()
|
||||
48
gitea_auto_update/lib/version.py
Normal file
48
gitea_auto_update/lib/version.py
Normal file
@@ -0,0 +1,48 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
from packaging import version
|
||||
import os
|
||||
import requests
|
||||
import logging
|
||||
|
||||
class Version:
|
||||
|
||||
def __init__(self, gtSite, gtFile):
|
||||
self.gtSite = gtSite
|
||||
self.gtFile = gtFile
|
||||
|
||||
def checkVersion(self, newVersion, oldVersion):
|
||||
# Function to check if there is a new version
|
||||
return version.parse(newVersion) > version.parse(oldVersion)
|
||||
|
||||
def parseFileVersion(self, string):
|
||||
return string.split(" ")[2]
|
||||
|
||||
def getVersionFromFile(self):
|
||||
versionString = os.popen(self.gtFile + " -v").read()
|
||||
return self.parseFileVersion(versionString)
|
||||
|
||||
def getCurrentVersion(self):
|
||||
# Function to get the current version
|
||||
try:
|
||||
# Try to get the version from the file
|
||||
currentVersion = self.getVersionFromFile()
|
||||
except:
|
||||
# Get the version via the web api if the file does fail
|
||||
currentVersion = requests.get(self.gtSite).json()['version']
|
||||
if currentVersion.status_code != 200:
|
||||
currentVersion = self.getVersionFromFile()
|
||||
finally:
|
||||
logging.info('Version: current_version = %s', currentVersion)
|
||||
return currentVersion
|
||||
|
||||
def getGithubVersionTag(self, apiUrl):
|
||||
versionTag = requests.get(apiUrl).json()['tag_name']
|
||||
logging.info('Version: github_version_tag = %s', versionTag)
|
||||
return versionTag
|
||||
81
gitea_auto_update/update.py
Normal file
81
gitea_auto_update/update.py
Normal file
@@ -0,0 +1,81 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import os
|
||||
import logging
|
||||
import configparser
|
||||
import fire
|
||||
import gitea_auto_update.lib.version
|
||||
import gitea_auto_update.lib.download
|
||||
import gitea_auto_update.lib.build
|
||||
|
||||
class Update:
|
||||
|
||||
def __init__(self, gtSite, gtFile, sourceDir, apiUrl, buildFromSource, tmpDir, gtSystem):
|
||||
self.gtSite = gtSite
|
||||
self.gtFile = gtFile
|
||||
self.sourceDir = sourceDir
|
||||
self.apiUrl = apiUrl
|
||||
self.buildFromSource = buildFromSource
|
||||
self.tmpDir = tmpDir
|
||||
self.gtSystem = gtSystem
|
||||
|
||||
self.initVersionAndBuild()
|
||||
self.getVersionAndTag()
|
||||
self.checkAndUpdate()
|
||||
|
||||
def initVersionAndBuild(self):
|
||||
self.version = gitea_auto_update.lib.version.Version(self.gtSite, self.gtFile)
|
||||
self.build = gitea_auto_update.lib.build.Build(self.gtFile, self.sourceDir)
|
||||
|
||||
def getVersionAndTag(self):
|
||||
self.currentVersion = self.version.getCurrentVersion() # Version from gitea site
|
||||
self.githubVersionTag = self.version.getGithubVersionTag(self.apiUrl) # Get version tag from github and remove first char (v)
|
||||
self.githubVersion = self.githubVersionTag[1:] # Get version from version tag
|
||||
|
||||
def doUpdate(self):
|
||||
if self.buildFromSource: # Should the new version be build from source?
|
||||
self.build.fromSource(self.githubVersionTag)
|
||||
else:
|
||||
self.download = gitea_auto_update.lib.download.Download(self.tmpDir,
|
||||
self.githubVersion,
|
||||
self.githubVersionTag,
|
||||
self.gtSystem,
|
||||
self.gtFile)
|
||||
|
||||
def checkAndUpdate(self):
|
||||
if self.version.checkVersion(self.githubVersion, self.currentVersion): # Check if there is a new version
|
||||
logging.info('Update: new version available, stopping service')
|
||||
os.system("systemctl stop gitea.service")
|
||||
self.doUpdate()
|
||||
logging.info('Update: starting gitea.service')
|
||||
os.system("systemctl start gitea.service")
|
||||
print("update successfully")
|
||||
else:
|
||||
print("current version is uptodate")
|
||||
|
||||
def updater(settings='settings.ini'):
|
||||
# Config
|
||||
config = configparser.ConfigParser()
|
||||
config.read(settings)
|
||||
# Create a log file
|
||||
logging.basicConfig(filename=config.get('Gitea', 'logFile'), level=logging.DEBUG)
|
||||
# Start update
|
||||
Update(config.get('Gitea', 'site'),
|
||||
config.get('Gitea', 'file'),
|
||||
config.get('Gitea', 'sourceDir'),
|
||||
config.get('Gitea', 'apiUrl'),
|
||||
config.get('Gitea', 'buildFromSource'),
|
||||
config.get('Gitea', 'tmpDir'),
|
||||
config.get('Gitea', 'system'))
|
||||
|
||||
def main():
|
||||
fire.Fire(updater)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
9
settings.ini
Normal file
9
settings.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[Gitea]
|
||||
site=https://your-gitea-instance.com/api/v1/version
|
||||
apiUrl=https://api.github.com/repos/go-gitea/gitea/releases/latest
|
||||
system=linux-amd64
|
||||
file=/usr/local/bin/gitea
|
||||
tmpDir=/tmp/
|
||||
buildFromSource=None
|
||||
sourceDir=/home/git/go/src/code.gitea.io/gitea
|
||||
logFile=update.log
|
||||
23
settings.py
23
settings.py
@@ -1,23 +0,0 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
# Gitea Site
|
||||
# Optional - the script will get the version from the gitea file if you change the url to a empty string
|
||||
gtsite = 'https://your-gitea-instance.com/api/v1/version'
|
||||
# Gitea GitHub API URL for latest Relase
|
||||
gtgithubapiurl = 'https://api.github.com/repos/go-gitea/gitea/releases/latest'
|
||||
# Gitea System
|
||||
gtsystem = 'linux-amd64'
|
||||
# Name and Path of gitea file
|
||||
gtfile = '/usr/local/bin/gitea'
|
||||
# tmp Name and Path of gitea file
|
||||
tmpdir = '/tmp/'
|
||||
# Build new version from source?
|
||||
build_from_source = None
|
||||
# Source directroy
|
||||
source_dir = '/home/git/go/src/code.gitea.io/gitea'
|
||||
31
setup.py
Normal file
31
setup.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import setuptools
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setuptools.setup(name='gitea_auto_update',
|
||||
version='2.0.5',
|
||||
description='A script which can update gitea to a new version.',
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url='https://github.com/CMiksche/gitea-auto-update',
|
||||
author='Christoph Miksche',
|
||||
author_email='christoph@miksche.org',
|
||||
license='GPLv3',
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
||||
"Operating System :: Unix",
|
||||
],
|
||||
keywords=['gitea', 'update', 'debian', 'linux'],
|
||||
install_requires=[
|
||||
'requests',
|
||||
'packaging',
|
||||
'fire',
|
||||
'configparser'
|
||||
],
|
||||
packages=setuptools.find_packages(),
|
||||
entry_points={
|
||||
'console_scripts': ['gitea-auto-update=gitea_auto_update.update:main'],
|
||||
}
|
||||
)
|
||||
18
tests.py
18
tests.py
@@ -6,31 +6,33 @@ All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import functions
|
||||
import gitea_auto_update.lib.version
|
||||
import unittest
|
||||
|
||||
version = gitea_auto_update.lib.version.Version('', '')
|
||||
|
||||
class Tests(unittest.TestCase):
|
||||
|
||||
def testSimpleVersion(self):
|
||||
self.assertTrue(functions.checkVersion('1.9.1', '1.9.0'))
|
||||
self.assertTrue(version.checkVersion('1.9.1', '1.9.0'))
|
||||
|
||||
def testTwoIntVersion(self):
|
||||
self.assertTrue(functions.checkVersion('1.10.0', '1.9.0'))
|
||||
self.assertTrue(version.checkVersion('1.10.0', '1.9.0'))
|
||||
|
||||
def testFalseVersion(self):
|
||||
self.assertFalse(functions.checkVersion('1.8.0', '1.9.0'))
|
||||
self.assertFalse(version.checkVersion('1.8.0', '1.9.0'))
|
||||
|
||||
def testSameVersion(self):
|
||||
self.assertFalse(functions.checkVersion('1.9.7', '1.9.7'))
|
||||
self.assertFalse(version.checkVersion('1.9.7', '1.9.7'))
|
||||
|
||||
def testInt(self):
|
||||
self.assertTrue(functions.checkVersion('9', '8'))
|
||||
self.assertTrue(version.checkVersion('9', '8'))
|
||||
|
||||
def testSuffix(self):
|
||||
self.assertTrue(functions.checkVersion('1.9.0+dev-264-g8de76b6e6', '1.8.0'))
|
||||
self.assertTrue(version.checkVersion('1.9.0+dev-264-g8de76b6e6', '1.8.0'))
|
||||
|
||||
def testParseFileVersion(self):
|
||||
self.assertEqual(functions.parseFileVersion('Gitea version 1.8.1 built with go1.12.2 : bindata, sqlite, sqlite_unlock_notify'), '1.8.1')
|
||||
self.assertEqual(version.parseFileVersion('Gitea version 1.8.1 built with go1.12.2 : bindata, sqlite, sqlite_unlock_notify'), '1.8.1')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
86
updater.py
86
updater.py
@@ -1,86 +0,0 @@
|
||||
'''
|
||||
Gitea Auto Updater
|
||||
|
||||
Copyright 2018, 2019 The Gitea-Auto-Update Authors
|
||||
All rights reserved.
|
||||
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import settings
|
||||
import requests
|
||||
import os
|
||||
import functions
|
||||
|
||||
if not functions.is_tool("xz"):
|
||||
print ("missing dependency: xz")
|
||||
quit()
|
||||
|
||||
# Version from gitea site
|
||||
current_version = functions.getCurrentVersion()
|
||||
print ("current_version =", current_version)
|
||||
# Get version tag from github and remove first char (v)
|
||||
github_version_tag = requests.get(settings.gtgithubapiurl).json()['tag_name']
|
||||
print ("github_version_tag =", github_version_tag)
|
||||
# Get version from version tag
|
||||
github_version = github_version_tag[1:]
|
||||
# Check if there is a new version
|
||||
if functions.checkVersion(github_version, current_version):
|
||||
|
||||
|
||||
# Stop systemd service
|
||||
print ("new version available, stopping service")
|
||||
os.system("systemctl stop gitea.service")
|
||||
|
||||
# Should the new version be build from source?
|
||||
if settings.build_from_source:
|
||||
|
||||
functions.buildFromSource(github_version_tag)
|
||||
|
||||
else:
|
||||
# Set download url
|
||||
## main file
|
||||
gtdownload = 'https://github.com/go-gitea/gitea/releases/download/'+github_version_tag+'/gitea-'+github_version+'-'+settings.gtsystem+'.xz'
|
||||
print (gtdownload)
|
||||
## sha256 file
|
||||
shadownload = 'https://github.com/go-gitea/gitea/releases/download/'+github_version_tag+'/gitea-'+github_version+'-'+settings.gtsystem+'.xz.sha256'
|
||||
print (shadownload)
|
||||
|
||||
# Download file
|
||||
|
||||
## downloading sha
|
||||
print ("downloading sha256 hashsum")
|
||||
functions.download(shadownload, settings.tmpdir+'gitea.xz.sha256')
|
||||
## downloading xz
|
||||
print ("downloading", github_version_tag+'gitea.xz')
|
||||
tmpxz = settings.tmpdir+'gitea-'+github_version+'-'+settings.gtsystem+'.xz'
|
||||
functions.download(gtdownload, tmpxz)
|
||||
|
||||
# doing sha256 sum
|
||||
os.chdir(settings.tmpdir)
|
||||
#sha_value = os.system("sha256sum -c gitea.xz.sha256 > /dev/null")
|
||||
|
||||
if os.system("sha256sum -c gitea.xz.sha256 > /dev/null") == 0:
|
||||
print ("sha ok, extracting file to location")
|
||||
# extracting download file
|
||||
cmd = "xz -d "+tmpxz
|
||||
print (cmd)
|
||||
os.system(cmd)
|
||||
# moving temp file to gtfile location
|
||||
cmd = 'mv '+settings.tmpdir+'gitea-'+github_version+'-'+settings.gtsystem+' '+settings.gtfile
|
||||
print (cmd)
|
||||
os.system(cmd)
|
||||
else:
|
||||
print ("error")
|
||||
quit()
|
||||
|
||||
# Start systemd service
|
||||
print ("starting gitea.service")
|
||||
os.system("systemctl start gitea.service")
|
||||
|
||||
print ("update successfully")
|
||||
|
||||
|
||||
else:
|
||||
|
||||
#Print current version is uptodate
|
||||
print ("current version is uptodate")
|
||||
Reference in New Issue
Block a user