summaryrefslogtreecommitdiffstats
path: root/scripts/BuildDemos.py
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-07 15:09:00 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-07 15:09:00 +0300
commitbd7f4bf17f9904a2f5e8e173aeda1d1f592982cc (patch)
tree0524b86fbdd88833f58bcfa8704b770015492738 /scripts/BuildDemos.py
parentff6d55163c13ba0cd764b209dc1252e2992cf2d8 (diff)
downloadvaadin-framework-bd7f4bf17f9904a2f5e8e173aeda1d1f592982cc.tar.gz
vaadin-framework-bd7f4bf17f9904a2f5e8e173aeda1d1f592982cc.zip
Add Demo validation script support for using local artifacts
Change-Id: I47f6bd7b4b73371ffe10a80f6af215146f7895e4
Diffstat (limited to 'scripts/BuildDemos.py')
-rw-r--r--scripts/BuildDemos.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py
index 6d8445b4d1..721fec4c68 100644
--- a/scripts/BuildDemos.py
+++ b/scripts/BuildDemos.py
@@ -9,14 +9,16 @@
# pip install requests
# Deploy depends on .deployUrl and .deployCredentials files in home folder
-import sys
+import sys, os
try:
from git import Repo
except:
print("BuildDemos depends on gitpython. Install it with `pip install gitpython`")
sys.exit(1)
-from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs
+from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall
from DeployHelpers import deployWar
+from os.path import join, isfile
+from fnmatch import fnmatch
# Validated demos. name -> git url
demos = {
@@ -30,8 +32,19 @@ def checkout(folder, url):
Repo.clone_from(url, folder)
if __name__ == "__main__":
- if getArgs().teamcity:
- print("Add dependency jars from TeamCity here")
+ if hasattr(getArgs(), "artifactPath") and getArgs().artifactPath is not None:
+ basePath = getArgs().artifactPath
+ poms = []
+ for root, dirs, files in os.walk(basePath):
+ for name in files:
+ if fnmatch(name, "*.pom"):
+ poms.append(join(root, name))
+ for pom in poms:
+ jarFile = pom.replace(".pom", ".jar")
+ if isfile(jarFile):
+ mavenInstall(pom, jarFile)
+ else:
+ mavenInstall(pom)
demosFailed = False