summaryrefslogtreecommitdiffstats
path: root/scripts/BuildHelpers.py
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-06-15 12:31:07 +0300
committerHenri Sara <hesara@vaadin.com>2015-07-07 10:16:00 +0000
commitff6d55163c13ba0cd764b209dc1252e2992cf2d8 (patch)
treeda89632abc7f9d08d59eda1337d597e38be76720 /scripts/BuildHelpers.py
parent771da038480192a2d49a3672a33850ec3f8e3269 (diff)
downloadvaadin-framework-ff6d55163c13ba0cd764b209dc1252e2992cf2d8.tar.gz
vaadin-framework-ff6d55163c13ba0cd764b209dc1252e2992cf2d8.zip
Add --maven parameter to add mvn commandline parameters
Also adds a --teamcity flag, planned future functionality to add supplied jar dependencies to local maven repo, and flags for setting wildfly autodeployment parameters (url, user, password) Change-Id: I6690cda0d3bfd18d665ffbc61b8502f91f9fd475
Diffstat (limited to 'scripts/BuildHelpers.py')
-rw-r--r--scripts/BuildHelpers.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/BuildHelpers.py b/scripts/BuildHelpers.py
index 7349c9b367..534ce53441 100644
--- a/scripts/BuildHelpers.py
+++ b/scripts/BuildHelpers.py
@@ -27,21 +27,19 @@ elif not isdir(resultPath):
args = None
-# Parse command line arguments <version> <framework-repo-id> <archetype-repo-id> <plugin-repo-id>
+# Default argument parser
+parser = argparse.ArgumentParser(description="Automated staging validation")
+parser.add_argument("version", type=str, help="Vaadin version to use")
+parser.add_argument("--maven", help="Additional maven command line parameters", default=None)
+parser.add_argument("--teamcity", help="Use vaadin jars provided by teamcity", action="store_const", const=True, default=False)
+
+# Parse command line arguments <version>
def parseArgs():
- # Command line arguments for this script
- parser = argparse.ArgumentParser(description="Automated staging validation")
- parser.add_argument("version", type=str, help="Vaadin version to use")
- parser.add_argument("framework", type=int, help="Framework repo id (comvaadin-XXXX)", nargs='?')
- parser.add_argument("archetype", type=int, help="Archetype repo id (comvaadin-XXXX)", nargs='?')
- parser.add_argument("plugin", type=int, help="Maven Plugin repo id (comvaadin-XXXX)", nargs='?')
-
# If no args, give help
if len(sys.argv) == 1:
args = parser.parse_args(["-h"])
else:
args = parser.parse_args()
-
return args
# Function for determining the path for maven executable
@@ -81,6 +79,8 @@ def mavenValidate(artifactId, mvnCmd = mavenCmd, logFile = sys.stdout, repoIds =
cmd = [mvnCmd]
if hasattr(repoIds, "version") and repoIds.version is not None:
cmd.append("-Dvaadin.version=%s" % (repoIds.version))
+ if hasattr(repoIds, "maven") and repoIds.maven is not None:
+ 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)