4
0
mirror of https://github.com/QuasarApp/QuasarAppCI.git synced 2025-05-03 00:39:37 +00:00

ref fix seecret manager

This commit is contained in:
Andrei Yankovich 2021-04-06 00:33:46 +03:00
parent cc062a6232
commit b768975a48
5 changed files with 19 additions and 14 deletions

@ -55,7 +55,8 @@ class CMake(Make):
return ' '.join(options) return ' '.join(options)
def androidXmakeCmd(self, props): def androidXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json") file = self.home + "/buildBotSecret/secret.json"
secret = SecretManager(file, props)
toochainFile = 'build/cmake/android.toolchain.cmake' toochainFile = 'build/cmake/android.toolchain.cmake'
options = [ options = [

@ -30,7 +30,8 @@ class CrossplatformQmake (QMake):
return command return command
def androidXmakeCmd(self, props): def androidXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json") file = self.home + "/buildBotSecret/secret.json"
secret = SecretManager(file, props)
command = [ command = [
'qmake-android', 'qmake-android',

@ -85,7 +85,8 @@ class Make(BaseModule):
return command return command
def androidXmakeCmd(self, props): def androidXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json") file = self.home + "/buildBotSecret/secret.json"
secret = SecretManager(file, props)
command = [ command = [
'qmake-android', 'qmake-android',

@ -31,7 +31,8 @@ class QMake(Make):
return self.mainCmd() return self.mainCmd()
def androidXmakeCmd(self, props): def androidXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json") file = self.home + "/buildBotSecret/secret.json"
secret = SecretManager(file, props)
command = [ command = [
'qmake', 'qmake',

@ -5,15 +5,16 @@ from pathlib import Path
class SecretManager: class SecretManager:
def __init__(self, jsFile): def __init__(self, jsFile, properties=None):
try:
contents = Path(jsFile).read_text() contents = Path(jsFile).read_text()
self.jsfile = json.loads(contents) self.jsfile = json.loads(contents)
except: self.prop = properties
pass
def getValue(self, key): def getValue(self, key):
try: value = self.jsfile[key]
return self.jsfile[key]
except: if self.prop:
pass self.prop.useSecret(value, key)
return value