mirror of
https://github.com/QuasarApp/QuasarAppCI.git
synced 2025-04-26 22:04:32 +00:00
added module for installer assets
This commit is contained in:
parent
785bc49903
commit
5607df30ab
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,3 +8,6 @@ gitpoller-workdir/
|
||||
*.user
|
||||
*__pycache__*
|
||||
*.pyc
|
||||
|
||||
*.pyproject.user.*
|
||||
*~
|
||||
|
@ -18,7 +18,7 @@
|
||||
"qtUpdater.py",
|
||||
"secretManager.py",
|
||||
"NPM.py",
|
||||
"git/gitBin.sh"
|
||||
|
||||
"git/gitBin.sh",
|
||||
"asssetsinstaller.py"
|
||||
]
|
||||
}
|
||||
|
76
BuildBotLib/asssetsinstaller.py
Normal file
76
BuildBotLib/asssetsinstaller.py
Normal file
@ -0,0 +1,76 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
|
||||
import BuildBotLib.basemodule as base
|
||||
from buildbot.plugins import util, steps
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
@util.renderer
|
||||
def NDKDownloadCMD(props):
|
||||
link = props.getProperty("revision")
|
||||
module = props.getProperty("module")
|
||||
|
||||
shutil.rmtree(module)
|
||||
|
||||
res = []
|
||||
format = link[link.rfind('.'):]
|
||||
|
||||
if module == "AndroidNDK":
|
||||
res = ["curl", link, "--output", "temp." + format]
|
||||
return res
|
||||
|
||||
|
||||
@util.renderer
|
||||
def ExtractCMD(props):
|
||||
|
||||
arr = os.listdir()
|
||||
format = ""
|
||||
module = props.getProperty("module")
|
||||
|
||||
for file in arr:
|
||||
ix = file.find("temp.")
|
||||
if ix == 0:
|
||||
format = file[file.rfind('.'):]
|
||||
|
||||
res = []
|
||||
|
||||
if format == "zip":
|
||||
res = ["unsip", "-d", module]
|
||||
return res
|
||||
|
||||
|
||||
def getFactory():
|
||||
factory = base.getFactory();
|
||||
|
||||
factory.addStep(
|
||||
steps.ShellCommand(
|
||||
command = NDKDownloadCMD,
|
||||
name = 'download new item',
|
||||
description = 'download new item',
|
||||
)
|
||||
);
|
||||
|
||||
factory.addStep(
|
||||
steps.ShellCommand(
|
||||
command = ExtractCMD,
|
||||
name = 'extract new item',
|
||||
description = 'extract new item',
|
||||
)
|
||||
);
|
||||
|
||||
return factory
|
||||
|
||||
|
||||
def getRepo():
|
||||
return "";
|
||||
|
||||
|
||||
def getPropertyes():
|
||||
return [
|
||||
util.ChoiceStringParameter(
|
||||
name = 'module',
|
||||
choices=["AndroidNDK", "AndroidSDK"],
|
||||
default = "AndroidNDK"
|
||||
),
|
||||
]
|
@ -16,7 +16,8 @@ class buildBotWorkers(BuildBotModule):
|
||||
worker.Worker("github-worker", "pass"),
|
||||
worker.Worker("Tester", "pass"),
|
||||
worker.Worker("qtBuilder", "pass"),
|
||||
worker.Worker("NPM", "pass")
|
||||
worker.Worker("NPM", "pass"),
|
||||
worker.Worker("AssetsInstaller", "pass")
|
||||
|
||||
]
|
||||
|
||||
|
@ -17,6 +17,7 @@ bot.addBuilder("github-worker", "qmake");
|
||||
bot.addBuilder("Tester", "qmake");
|
||||
bot.addBuilder("qtBuilder", "qtUpdater");
|
||||
bot.addBuilder("NPM", "NPM");
|
||||
bot.addBuilder("AssetsInstaller", "asssetsinstaller");
|
||||
|
||||
c = BuildmasterConfig = bot.getMaster()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user