First step towards auto-extracting client
client.py will pull from github, as requested by the server client.py will extract and put all files locally ( except replacing itself ? ) Moved cutechess directly into the Client folder to it gets pulled. May need to chmod +x the cutechess-ob for Linux on demand. In the future, the cleanup script will delete everythinge except: client.py, and any credentials.* files. Such that one can run an openbench client in any directory, from a single file.
This commit is contained in:
1 parent
91ea350f1d
commit
4ec9d5b529
8 files changed
+1482
-1401
No files matched your search
+11
-8
@@ -589,16 +589,19 @@ def verify_worker(function):
|
||||
return wrapped_verify_worker
|
||||
|
||||
@csrf_exempt
|
||||
def client_get_files(request):
|
||||
def client_version_ref(request):
|
||||
|
||||
## Location of static compile of Cutechess for Windows and Linux.
|
||||
## OpenBench does not serve these files, but points to a repo ideally.
|
||||
# Verify the User's credentials
|
||||
try: user = authenticate(request, True)
|
||||
except UnableToAuthenticate:
|
||||
return JsonResponse({ 'error' : 'Bad Credentials' })
|
||||
|
||||
repo = '%s/%s' % (OPENBENCH_CONFIG['client_repo_url'], OPENBENCH_CONFIG['client_repo_ref'])
|
||||
repo = repo.replace('/github.com/', '/raw.githubusercontent.com/')
|
||||
repo = OpenBench.utils.path_join(repo, 'CoreFiles')
|
||||
|
||||
return JsonResponse({ 'location' : repo })
|
||||
# Enough information to download the right Client
|
||||
return JsonResponse({
|
||||
'client_version' : OPENBENCH_CONFIG['client_version' ],
|
||||
'client_repo_url' : OPENBENCH_CONFIG['client_repo_url'],
|
||||
'client_repo_ref' : OPENBENCH_CONFIG['client_repo_ref'],
|
||||
})
|
||||
|
||||
@csrf_exempt
|
||||
def client_get_build_info(request):
|
||||
|
||||
Reference in new issue
Block a user