self hosted testing
This commit is contained in:
@@ -22,11 +22,11 @@ def generator_view(request):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = GenerateForm(request.POST, request.FILES)
|
form = GenerateForm(request.POST, request.FILES)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
# user_secret = form.cleaned_data['sh_secret_field']
|
user_secret = form.cleaned_data['sh_secret_field']
|
||||||
# if _settings.SH_SECRET == user_secret:
|
if _settings.SH_SECRET == user_secret:
|
||||||
# selfhosted = True
|
selfhosted = True
|
||||||
# else:
|
else:
|
||||||
# selfhosted = False
|
selfhosted = False
|
||||||
platform = form.cleaned_data['platform']
|
platform = form.cleaned_data['platform']
|
||||||
version = form.cleaned_data['version']
|
version = form.cleaned_data['version']
|
||||||
delayFix = form.cleaned_data['delayFix']
|
delayFix = form.cleaned_data['delayFix']
|
||||||
@@ -231,8 +231,8 @@ def generator_view(request):
|
|||||||
####from here run the github action, we need user, repo, access token.
|
####from here run the github action, we need user, repo, access token.
|
||||||
if platform == 'windows':
|
if platform == 'windows':
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
||||||
# if selfhosted:
|
if selfhosted:
|
||||||
# url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/sh-generator-windows.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/sh-generator-windows.yml/dispatches'
|
||||||
if platform == 'windows-x86':
|
if platform == 'windows-x86':
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows-x86.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows-x86.yml/dispatches'
|
||||||
elif platform == 'linux':
|
elif platform == 'linux':
|
||||||
@@ -243,8 +243,8 @@ def generator_view(request):
|
|||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-macos.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-macos.yml/dispatches'
|
||||||
else:
|
else:
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
||||||
# if selfhosted:
|
if selfhosted:
|
||||||
# url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/sh-generator-windows.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/sh-generator-windows.yml/dispatches'
|
||||||
|
|
||||||
#url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches'
|
#url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/test.yml/dispatches'
|
||||||
inputs_raw = {
|
inputs_raw = {
|
||||||
@@ -288,7 +288,6 @@ def generator_view(request):
|
|||||||
zf.setpassword(_settings.ZIP_PASSWORD.encode())
|
zf.setpassword(_settings.ZIP_PASSWORD.encode())
|
||||||
zf.write(temp_json_path, arcname="secrets.json")
|
zf.write(temp_json_path, arcname="secrets.json")
|
||||||
|
|
||||||
# 4. Cleanup the plain JSON file immediately
|
|
||||||
if os.path.exists(temp_json_path):
|
if os.path.exists(temp_json_path):
|
||||||
os.remove(temp_json_path)
|
os.remove(temp_json_path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user