mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 10:36:12 +00:00
Include installed package files in upgrade actions
This commit is contained in:
@@ -649,11 +649,17 @@ func (operation *BPMOperation) GetModifiedFiles() {
|
|||||||
installAction := action.(*InstallPackageAction)
|
installAction := action.(*InstallPackageAction)
|
||||||
isUpgrade := IsPackageInstalled(installAction.BpmPackage.PkgInfo.Name, operation.RootDir)
|
isUpgrade := IsPackageInstalled(installAction.BpmPackage.PkgInfo.Name, operation.RootDir)
|
||||||
|
|
||||||
for _, pkgFile := range installAction.BpmPackage.PkgFiles {
|
if isUpgrade {
|
||||||
operation.ModifiedFiles[pkgFile.Path] = "install"
|
for _, pkgFile := range installAction.BpmPackage.PkgFiles {
|
||||||
if isUpgrade {
|
|
||||||
operation.ModifiedFiles[pkgFile.Path] = "upgrade"
|
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" {
|
if action.GetActionType() == "remove" {
|
||||||
|
|||||||
Reference in New Issue
Block a user