diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-07 15:55:50 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-07 15:55:50 +0300 |
commit | 61fe18d7771b378bc5c5211276489127c35c96ee (patch) | |
tree | d064abf46ce4bb588355994205792926492084ec /scripts/BuildHelpers.py | |
parent | bd7f4bf17f9904a2f5e8e173aeda1d1f592982cc (diff) | |
download | vaadin-framework-61fe18d7771b378bc5c5211276489127c35c96ee.tar.gz vaadin-framework-61fe18d7771b378bc5c5211276489127c35c96ee.zip |
Fix demo auto validation script to add validated version to context
Change-Id: Ie30fe7f9c0c88de02f19a1bc0f377399a3568da4
Diffstat (limited to 'scripts/BuildHelpers.py')
-rw-r--r-- | scripts/BuildHelpers.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/scripts/BuildHelpers.py b/scripts/BuildHelpers.py index 4fe815fae1..f2872f66f9 100644 --- a/scripts/BuildHelpers.py +++ b/scripts/BuildHelpers.py @@ -5,19 +5,16 @@ import sys, argparse, subprocess, platform from xml.etree import ElementTree from os.path import join, isdir, isfile, basename, exists -from os import listdir, getcwd, mkdir +from os import listdir, mkdir from shutil import copy, rmtree from glob import glob -class VersionObject(object): - pass - # Staging repo base url repo = "http://oss.sonatype.org/content/repositories/comvaadin-%d" # Directory where the resulting war files are stored # TODO: deploy results -resultPath = "result" +resultPath = join("result", "demos") if not exists(resultPath): mkdir(resultPath) @@ -83,15 +80,15 @@ def mavenValidate(artifactId, mvnCmd = mavenCmd, logFile = sys.stdout, repoIds = cmd.extend(repoIds.maven.split(" ")) cmd.extend(["clean", "package", "validate"]) print("executing: %s" % (" ".join(cmd))) - subprocess.check_call(cmd, cwd=join(getcwd(), artifactId), stdout=logFile) + subprocess.check_call(cmd, cwd=join(resultPath, artifactId), stdout=logFile) # Collect .war files to given folder with given naming def copyWarFiles(artifactId, resultDir = resultPath, name = None): if name is None: name = artifactId copiedWars = [] - warFiles = glob(join(getcwd(), artifactId, "target", "*.war")) - warFiles.extend(glob(join(getcwd(), artifactId, "*", "target", "*.war"))) + warFiles = glob(join(resultDir, artifactId, "target", "*.war")) + warFiles.extend(glob(join(resultDir, artifactId, "*", "target", "*.war"))) for warFile in warFiles: if len(warFiles) == 1: deployName = "%s.war" % (name) @@ -166,7 +163,7 @@ def removeDir(subdir): if '..' in subdir or '/' in subdir: # Dangerous relative paths. return - rmtree(join(getcwd(), subdir)) + rmtree(join(resultPath, subdir)) def mavenInstall(pomFile, jarFile = None, mvnCmd = mavenCmd, logFile = sys.stdout): cmd = [mvnCmd, "install:install-file"] |