dvc: use our own api instead of github's for version retrieval

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-05-10 14:40:59 +03:00
parent c563632f6e
commit 03ebdb5cf2
4 changed files with 9 additions and 9 deletions
+6 -7
View File
@@ -1,19 +1,18 @@
from github import Github
import json
import requests
from dvc import VERSION_BASE
from dvc.logger import Logger
GITHUB_USER = 'dataversioncontrol'
GITHUB_REPO = 'dvc'
DVCAPI_URL = 'https://4ki8820rsf.execute-api.us-east-2.amazonaws.com/prod/latest-version'
def check_updates():
current = VERSION_BASE
try:
gh = Github()
user = gh.get_user(GITHUB_USER)
repo = user.get_repo(GITHUB_REPO)
latest = repo.get_latest_release().title
r = requests.get(DVCAPI_URL)
j = json.loads(r.content)
latest = j['version']
except Exception as exc:
Logger.debug('Failed to obtain latest version: {}'.format(str(exc)))
return
+1
View File
@@ -0,0 +1 @@
"Hello from Lambda"
+1 -1
View File
@@ -20,4 +20,4 @@ paramiko>=2.4.1
binaryornot==0.4.4
jsonpath-rw==1.4.0
reflink==0.2.0
PyGithub>=1.39
requests>=2.18.4
+1 -1
View File
@@ -26,7 +26,7 @@ install_requires = [
"binaryornot==0.4.4",
"jsonpath-rw==1.4.0",
"reflink==0.2.0",
"PyGithub>=1.39",
"requests>=2.18.4",
]
setup(