diff options
Diffstat (limited to 'scripts/BuildDemos.py')
-rw-r--r-- | scripts/BuildDemos.py | 17 |
1 files changed, 10 insertions, 7 deletions
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 = [] |