Skip to content

Commit

Permalink
Fixed single program build
Browse files Browse the repository at this point in the history
  • Loading branch information
drbruce-git committed Jun 11, 2019
1 parent 1c9a409 commit e72aba7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Build/zAppBuild/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ However this will result in an error message because the build.groovy script has
* --outDir <arg> - Absolute path to the build output root directory on USS
* --hlq <arg> - 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
Expand All @@ -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**
```
Expand All @@ -40,7 +41,7 @@ $DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1
```
$DBB_HOME/bin/groovyz <ussLocation>/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:
Expand Down
14 changes: 7 additions & 7 deletions Build/zAppBuild/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion Build/zAppBuild/utilities/BuildUtilities.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e72aba7

Please sign in to comment.