aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-13 13:44:41 +0300
committerVaadin Code Review <review@vaadin.com>2015-07-13 11:12:25 +0000
commit7c324e2bdd242979e8110ca7100726bf040e6904 (patch)
tree611fec2ce6d8e380be385a06b3cb4fc904073b61
parent960cdf2a72b47f750cb5ec13e88845d10de843b2 (diff)
downloadvaadin-framework-7c324e2bdd242979e8110ca7100726bf040e6904.tar.gz
vaadin-framework-7c324e2bdd242979e8110ca7100726bf040e6904.zip
Add optional --repo parameter for Demo validation script
Change-Id: Id22fc2ef4acad52e91a18e4cc10bf73a9ab4d924
-rw-r--r--scripts/BuildDemos.py15
-rw-r--r--scripts/BuildHelpers.py2
2 files changed, 11 insertions, 6 deletions
diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py
index a13b5ac033..ac161fc517 100644
--- a/scripts/BuildDemos.py
+++ b/scripts/BuildDemos.py
@@ -32,12 +32,16 @@ if __name__ == "__main__":
except:
print("BuildDemos depends on gitpython. Install it with `pip install gitpython`")
sys.exit(1)
- from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall, resultPath, readPomFile
+ from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall, resultPath, readPomFile, parser
from DeployHelpers import deployWar
- if hasattr(getArgs(), "artifactPath") and getArgs().artifactPath is not None:
+ # Add command line arguments for staging repos
+ parser.add_argument("--repo", type=str, help="Staging repository URL", default=None)
+
+ args = getArgs()
+ if hasattr(args, "artifactPath") and args.artifactPath is not None:
version = False
- basePath = getArgs().artifactPath
+ basePath = args.artifactPath
poms = []
for root, dirs, files in os.walk(basePath):
for name in files:
@@ -52,14 +56,15 @@ if __name__ == "__main__":
if "vaadin-server" in pom:
pomXml, nameSpace = readPomFile(pom)
for version in pomXml.getroot().findall("./{%s}version" % (nameSpace)):
- getArgs().version = version.text
+ args.version = version.text
demosFailed = False
for demo in demos:
print("Validating demo %s" % (demo))
try:
checkout(demo, demos[demo])
- updateRepositories(demo)
+ if hasattr(args, "repo") and args.repo is not None:
+ updateRepositories(join(resultPath, demo), args.repo)
mavenValidate(demo, logFile=getLogFile(demo))
resultWars = copyWarFiles(demo)
for war in resultWars:
diff --git a/scripts/BuildHelpers.py b/scripts/BuildHelpers.py
index cbcf821632..7545467f98 100644
--- a/scripts/BuildHelpers.py
+++ b/scripts/BuildHelpers.py
@@ -113,7 +113,7 @@ def updateRepositories(path, repoUrl = None, version = None):
# If versions are not supplied, parse arguments
if version is None:
version = getArgs().version
-
+
# Read pom.xml
pomXml = join(path, "pom.xml")
if isfile(pomXml):