mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-10-31 11:01:48 +00:00
Include installed package files in upgrade actions
This commit is contained in:
1 file changed
+9
-3
@@ -649,11 +649,17 @@ func (operation *BPMOperation) GetModifiedFiles() {
|
||||
installAction := action.(*InstallPackageAction)
|
||||
isUpgrade := IsPackageInstalled(installAction.BpmPackage.PkgInfo.Name, operation.RootDir)
|
||||
|
||||
for _, pkgFile := range installAction.BpmPackage.PkgFiles {
|
||||
operation.ModifiedFiles[pkgFile.Path] = "install"
|
||||
if isUpgrade {
|
||||
if isUpgrade {
|
||||
for _, pkgFile := range installAction.BpmPackage.PkgFiles {
|
||||
operation.ModifiedFiles[pkgFile.Path] = "upgrade"
|
||||
}
|
||||
for _, pkgFile := range GetPackage(installAction.BpmPackage.PkgInfo.Name, operation.RootDir).PkgFiles {
|
||||
operation.ModifiedFiles[pkgFile.Path] = "upgrade"
|
||||
}
|
||||
} else {
|
||||
for _, pkgFile := range installAction.BpmPackage.PkgFiles {
|
||||
operation.ModifiedFiles[pkgFile.Path] = "install"
|
||||
}
|
||||
}
|
||||
}
|
||||
if action.GetActionType() == "remove" {
|
||||
|
||||
Reference in new issue
Block a user