IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
40 stars 140 forks source link

Add file count and progress indicators to language scripts. #336

Closed MarcBauer-LM closed 1 year ago

MarcBauer-LM commented 1 year ago

This change enhances the language scripts to display progress indicators and file counts during script execution. Each file processed by the script is now labeled with its number in the total count of files, as well as its progress in the overall processing sequence (e.g., 1 of X, 2 of X, 3 of X, ...). In addition, the files are now sorted before processing to ensure a consistent processing order.

dennis-behm commented 1 year ago

Hi @MarcBauer-LM ,

thank you for the PR.

I ran a build with your enhancements:

** Invoking build scripts according to build order: BMS.groovy,Cobol.groovy,LinkEdit.groovy,Transfer.groovy
** Building 2 files mapped to BMS.groovy script
*** Building file MortgageApplication/bms/epsmlis.bms - 1 of 2
*** Building file MortgageApplication/bms/epsmort.bms - 2 of 2
** Building 6 files mapped to Cobol.groovy script
*** Building file MortgageApplication/cobol/epsnbrvl.cbl - 1 of 6
*** Building file MortgageApplication/cobol/epscmort.cbl - 2 of 6
*** Building file MortgageApplication/cobol/epscsmrd.cbl - 3 of 6
*** Building file MortgageApplication/cobol/epscsmrt.cbl - 4 of 6
*** Building file MortgageApplication/cobol/epsmlist.cbl - 5 of 6
*** Building file MortgageApplication/cobol/epsmpmt.cbl - 6 of 6
** Building 1 file mapped to LinkEdit.groovy script
*** Building file MortgageApplication/link/epsmlist.lnk - 1 of 1

I am wondering, if we should change the order how the information are displayed:

** Invoking build scripts according to build order: BMS.groovy,Cobol.groovy,LinkEdit.groovy,Transfer.groovy
** Building 2 files mapped to BMS.groovy script
*** (1/2) Building file MortgageApplication/bms/epsmlis.bms 
*** (2/2) Building file MortgageApplication/bms/epsmort.bms
** Building 6 files mapped to Cobol.groovy script
*** (1/6) Building file MortgageApplication/cobol/epsnbrvl.cbl 
*** (2/6) Building file MortgageApplication/cobol/epscmort.cbl
*** (3/6) Building file MortgageApplication/cobol/epscsmrd.cbl 
*** (4/6) Building file MortgageApplication/cobol/epscsmrt.cbl 
*** (5/6) Building file MortgageApplication/cobol/epsmlist.cbl 
*** (6/6) Building file MortgageApplication/cobol/epsmpmt.cbl 
** Building 1 file mapped to LinkEdit.groovy script
*** (1/1) Building file MortgageApplication/link/epsmlist.lnk

What are your thoughts?

MarcBauer-LM commented 1 year ago

sure, I changed it