Skip to content

Commit

Permalink
fix: set package replace value by original package name (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoerr authored Jul 19, 2024
1 parent b4626ad commit e92b8c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/release-build-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,17 @@ function updateComposerPluginConfigForMageOs(composerConfig, vendor) {
* This also happens for the "replace" section, before the given replaceVersionMap is merged.
*/
function updateComposerConfigFromMagentoToMageOs(composerConfig, releaseVersion, replaceVersionMap, vendor) {
const originalPackageName = composerConfig.name

composerConfig.version = releaseVersion
composerConfig.name = setMageOsVendor(composerConfig.name, vendor)

updateComposerDepsFromMagentoToMageOs(composerConfig, vendor)
updateComposerDepsVersionForMageOs(composerConfig, releaseVersion, vendor)
updateComposerPluginConfigForMageOs(composerConfig, vendor)

if (replaceVersionMap[composerConfig.name]) {
composerConfig.replace = {[composerConfig.name]: replaceVersionMap[composerConfig.name]}
if (replaceVersionMap[originalPackageName]) {
composerConfig.replace = {[originalPackageName]: replaceVersionMap[originalPackageName]}
}
}

Expand Down

0 comments on commit e92b8c7

Please sign in to comment.