From e72aba75be5f4e1d552c8aab0c5fb2508fe1fed5 Mon Sep 17 00:00:00 2001 From: Daniel Bruce Date: Tue, 11 Jun 2019 08:44:49 -0400 Subject: [PATCH] Fixed single program build --- Build/zAppBuild/BUILD.md | 7 ++++--- Build/zAppBuild/build.groovy | 14 +++++++------- Build/zAppBuild/utilities/BuildUtilities.groovy | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Build/zAppBuild/BUILD.md b/Build/zAppBuild/BUILD.md index e622b989..f16340ed 100644 --- a/Build/zAppBuild/BUILD.md +++ b/Build/zAppBuild/BUILD.md @@ -7,6 +7,7 @@ However this will result in an error message because the build.groovy script has * --outDir - Absolute path to the build output root directory on USS * --hlq - High level qualifier for created build partition data sets + Example: ``` $DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 @@ -17,11 +18,11 @@ Since we are still missing a build target or calculated build option, the build **Build one program** ``` -$DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 cobol/epsmpmt.cbl +$DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 app1/cobol/epsmpmt.cbl ``` **Build a list of programs contained in a text file** ``` -$DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 buildList.txt +$DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 u/usr1/buildList.txt ``` **Build all programs in the application** ``` @@ -40,7 +41,7 @@ $DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 ``` $DBB_HOME/bin/groovyz /zAppBuild/build.groovy [options] buildfile -buildFile (optional): Path of the source file to build (relative to workspace). +buildFile (optional): Path of the source file to build (absolute or relative to workspace). If buildFile is a text file (*.txt), then it is assumed to be a build list file. Options: diff --git a/Build/zAppBuild/build.groovy b/Build/zAppBuild/build.groovy index e52dd842..242b272b 100644 --- a/Build/zAppBuild/build.groovy +++ b/Build/zAppBuild/build.groovy @@ -377,13 +377,6 @@ def createBuildList() { buildList.addAll(buildSet) buildSet = null - // scan and update source collection with build list files for non-impact builds - // since impact build list creation already scanned the incoming changed files - // we do not need to scan them again - if (!props.impactBuild && !props.userBuild) { - impactUtils.updateCollection(buildList, null, repositoryClient) - } - // write out build list to file (for documentation, not actually used by build scripts) String buildListFileLoc = "${props.buildOutDir}/buildList.${props.buildListFileExt}" println "** Writing build list file to $buildListFileLoc" @@ -396,6 +389,13 @@ def createBuildList() { } } + // scan and update source collection with build list files for non-impact builds + // since impact build list creation already scanned the incoming changed files + // we do not need to scan them again + if (!props.impactBuild && !props.userBuild) { + impactUtils.updateCollection(buildList, null, repositoryClient) + } + return buildList } diff --git a/Build/zAppBuild/utilities/BuildUtilities.groovy b/Build/zAppBuild/utilities/BuildUtilities.groovy index 838c82d6..8dd9fada 100644 --- a/Build/zAppBuild/utilities/BuildUtilities.groovy +++ b/Build/zAppBuild/utilities/BuildUtilities.groovy @@ -283,7 +283,7 @@ def getAbsolutePath(String path) { * relativizePath - converts an absolute path to a relative path from the workspace directory */ def relativizePath(String path) { - if (!path) + if (!path.startsWith('/')) return path String relPath = new File(props.workspace).toURI().relativize(new File(path.trim()).toURI()).getPath() // Directories have '/' added to the end. Lets remove it.