Skip to content

Commit dc59ba7

Browse files
🩹 [Patch]: Load the module from PR when overlaps (#32)
## Description - Load the module from the PR if its a framework dependency. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent a5cd81f commit dc59ba7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/helpers/Build/Build-PSModuleManifest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Build-PSModuleManifest {
3434

3535
$rootModule = Get-PSModuleRootModule -SourceFolderPath $ModuleOutputFolder
3636
$manifest.RootModule = $rootModule
37-
$manifest.ModuleVersion = '0.0.1'
37+
$manifest.ModuleVersion = '999.0.0'
3838

3939
$manifest.Author = $manifest.Keys -contains 'Author' ? ($manifest.Author | IsNotNullOrEmpty) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER
4040
Write-Verbose "[Author] - [$($manifest.Author)]"

scripts/helpers/Build/Import-PSModule.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
$manifestFile = Get-ModuleManifest -Path $manifestFilePath -As FileInfo -Verbose
3131

3232
Write-Verbose "Manifest file path: [$($manifestFile.FullName)]" -Verbose
33+
Get-Module -Name $ModuleName -ListAvailable | Remove-Module -Force -Verbose:$false
34+
Get-InstalledPSResource | Where-Object Name -EQ $ModuleName | Uninstall-PSResource -SkipDependencyCheck -Verbose:$false
3335
Resolve-PSModuleDependencies -ManifestFilePath $manifestFile
34-
Import-Module $ModuleName
36+
Import-Module -Name $ModuleName -RequiredVersion '999.0.0'
3537

3638
Write-Verbose 'List loaded modules'
3739
$availableModules = Get-Module -ListAvailable -Refresh -Verbose:$false

0 commit comments

Comments
 (0)