From a5a007ed9f03dac242ba9af6ec0974c256d6a289 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Wed, 8 Jul 2015 12:42:24 +0300 Subject: Add build report generator script Change-Id: I4145ba4dc91bc980110d63ad4284bbedb1219bc3 --- scripts/BuildDemos.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'scripts/BuildDemos.py') diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py index 16f6990d4c..9306153b9a 100644 --- a/scripts/BuildDemos.py +++ b/scripts/BuildDemos.py @@ -10,13 +10,6 @@ # Deploy depends on .deployUrl and .deployCredentials files in home folder 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, mavenInstall, resultPath -from DeployHelpers import deployWar from os.path import join, isfile from fnmatch import fnmatch @@ -32,6 +25,16 @@ def checkout(folder, url): Repo.clone_from(url, join(resultPath, folder)) if __name__ == "__main__": + # Do imports. + 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, mavenInstall, resultPath + from DeployHelpers import deployWar + + if hasattr(getArgs(), "artifactPath") and getArgs().artifactPath is not None: basePath = getArgs().artifactPath poms = [] -- cgit v1.2.3