Delete obsolete files¶
Script ifs_delete_obsolete_files.cmd/sh¶
The script ifs_delete_obsolete_files.cmd/sh is located in component fndbas/build folder, and will in a build home be located in the build folder.
The normal way to handle deleted files between releases is to create a new build_home. In pipelines it might be desirable to keep the old build_home even when upgrading to a new releases to have a uniform behavior on all deliveries. The ifs_delete_obsolete_files script can then be run as part of every delivery. The ifs_delete_obsolete_files will delete files given in a file list (generated by ifs_git_diff script). To ensure that moved or overtaken files are not deleted a comparison between the component structure(s) with the build_home will be made - this will prevent deleting all files in the given file list if the logic says it safer to keep the file.
The script accepts these arguments.
Parameter | Required | Purpose | Examples/Defaults |
---|---|---|---|
--components | Mandatory | Path to the components. The components will be analyzed to prevent deletion of still existing file(s). | --components "c:\work\components" |
--custcomponents | Optional | Path to the customized components. Both components and custcomponents will be analyzed for still existing files. | --custcomponents "c:\work\custcomponents" |
--buildhome | Mandatory | Path to the build home. | --buildhome "c:\work\build_home" |
--filelistname | Mandatory | A list of deleted files generated from ifs_git_diff.cmd/sh script. | --filelistname c:\work\difflist.txt |
--logfile | Optional - defaults to buildhome\delete-files.log | Log file name | --logfile c:\work\logs\logfile.log |
--dryrun | Optional | No deletion will be executed, only logging | --dryrun |
--help | Will show list of arguments |