We want to create a list of package names all at one time. Is there an automated way to do this?
CA Harvest SCM all versions
To accomplish this, create a simple text file containing a list of package names, for example:
C:\> type packagelist.txt
Package01
Package02
Package03
There is no tab delimiting or formatting, nothing else in the file except the names of the packages to create, a new package name on each line in the file.
On the Windows platform, this command will read the package name list text file you created and perform the "hcp" command for each name in the file:
set _FileName=<name of the file containing the list of package names>
for /F "tokens=*" %%i in (%_FileName%) do (
hcp "%%i" -b <brokername> -en <projectname> -st <statename> -usr <userid> -pw <password> -wts -oa MassCreatePackages.log
)
On Linux/Unix platforms, this command will read the package name list text file you created and perform the "hcp" command for each name in the file:
export _FileName=<name of the file containing the list of package names>
while IFS= read -r line; do
hcp "$line" <brokername> -en <projectname> -st <statename> -usr <userid> -pw <password> -wts -oa MassCreatePackages.log
done < "$_FileName"
More information on the "Create Package" command line utility is found here: hcp Command-Create Package