diff --git a/CHANGELOG.md b/CHANGELOG.md index 45413ad..3c1b4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,13 @@ # Carbon.Registry Changelog +## 1.2.1 + +Reducing directory depth of internal, private, nested modules. + ## 1.2.0 -> Unreleased +> Released 10 Jun 2024 Added `Get-CRegistryPermission`, `Grant-CRegistryPermission`, `Revoke-CRegistryPermission`, and `Test-CRegistryPermission`, migrated from Carbon's `Get-CPermission`, `Grant-CPermission`, `Revoke-CPermission`, and @@ -16,6 +20,7 @@ Added `Get-CRegistryPermission`, `Grant-CRegistryPermission`, `Revoke-CRegistryP * Replace usages of the `Test-CRegistryPermission` function's `-Exact` switch to `-Strict`. * Using the table below, replace usages of `Grant-CRegistryPermission` and `Test-CRegistryPermission` arguments in the left column with the new arguments from the right column. + | Old Argument | New Argument(s) |---------------------------------------------------------|--------------------------------------------------------- | `-Permission Container` | `-Permission KeyOnly` diff --git a/Carbon.Registry/Carbon.Registry.psd1 b/Carbon.Registry/Carbon.Registry.psd1 index a0eddfd..ea5b315 100644 --- a/Carbon.Registry/Carbon.Registry.psd1 +++ b/Carbon.Registry/Carbon.Registry.psd1 @@ -18,7 +18,7 @@ RootModule = 'Carbon.Registry.psm1' # Version number of this module. - ModuleVersion = '1.2.0' + ModuleVersion = '1.2.1' # ID used to uniquely identify this module GUID = '9772fb52-add8-47bf-83dc-0294ca8d9c64' diff --git a/Carbon.Registry/prism.json b/Carbon.Registry/prism.json index ef783ef..f02e5fd 100644 --- a/Carbon.Registry/prism.json +++ b/Carbon.Registry/prism.json @@ -2,9 +2,7 @@ "PSModules": [ { "Name": "Carbon.Security", - "Version": "1.*-*" + "Version": "1.*" } - ], - - "PSModulesDirectoryName": "Modules" + ] } \ No newline at end of file diff --git a/Carbon.Registry/prism.lock.json b/Carbon.Registry/prism.lock.json index da9ad0a..764126a 100644 --- a/Carbon.Registry/prism.lock.json +++ b/Carbon.Registry/prism.lock.json @@ -2,7 +2,7 @@ "PSModules": [ { "name": "Carbon.Security", - "version": "1.0.0-rc6", + "version": "1.0.3", "repositorySourceLocation": "https://www.powershellgallery.com/api/v2" } ] diff --git a/Tests/Grant-CRegistryPermission.Tests.ps1 b/Tests/Grant-CRegistryPermission.Tests.ps1 index c58d59c..b06ff30 100644 --- a/Tests/Grant-CRegistryPermission.Tests.ps1 +++ b/Tests/Grant-CRegistryPermission.Tests.ps1 @@ -9,6 +9,10 @@ BeforeAll { & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve) + Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\PSModules\Carbon.Accounts' -Resolve) ` + -Function @('Resolve-CPrincipalName') ` + -Verbose:$false + $script:testKeyPath = $null $script:testNum = 0 @@ -123,7 +127,7 @@ BeforeAll { @optionalParams $result = $result | Select-Object -Last 1 $result | Should -Not -BeNullOrEmpty - $result.IdentityReference | Should -Be (Resolve-CIdentityName $Identity) + $result.IdentityReference | Should -Be (Resolve-CPrincipalName $Identity) $result | Should -BeOfType $expectedRuleType if( -not $ExpectedPermission ) { diff --git a/Tests/Initialize-Test.ps1 b/Tests/Initialize-Test.ps1 index e17d4e4..a22efd7 100644 --- a/Tests/Initialize-Test.ps1 +++ b/Tests/Initialize-Test.ps1 @@ -57,6 +57,3 @@ finally $Global:VerbosePreference = $originalVerbosePref $Global:WhatIfPreference = $originalWhatIfPref } - -Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\PSModules\Carbon.Accounts' -Resolve) ` - -Function @('Resolve-CIdentityName') diff --git a/build.ps1 b/build.ps1 index 5512321..119e4c7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -78,7 +78,7 @@ Set-StrictMode -Version Latest # Set to a specific version to use a specific version of Whiskey. $whiskeyVersion = '0.*' -$allowPrerelease = $false +$allowPrerelease = $true $psModulesRoot = Join-Path -Path $PSScriptRoot -ChildPath 'PSModules' $whiskeyModuleRoot = Join-Path -Path $PSScriptRoot -ChildPath 'PSModules\Whiskey' diff --git a/init.ps1 b/init.ps1 index 7468f47..b00cda4 100644 --- a/init.ps1 +++ b/init.ps1 @@ -20,8 +20,6 @@ Set-StrictMode -Version 'Latest' $ErrorActionPreference = 'Stop' $InformationPreference = 'Continue' -prism install | Format-Table - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'PSModules\Carbon' -Resolve) ` -Function @('Install-CGroup', 'Install-CUser') diff --git a/prism.json b/prism.json index 65294fb..dc2ccd7 100644 --- a/prism.json +++ b/prism.json @@ -6,7 +6,7 @@ }, { "Name": "Carbon.Accounts", - "Version": "1.*-*" + "Version": "2.*" } ] } \ No newline at end of file diff --git a/prism.lock.json b/prism.lock.json index 88fd64b..588822b 100644 --- a/prism.lock.json +++ b/prism.lock.json @@ -7,7 +7,7 @@ }, { "name": "Carbon.Accounts", - "version": "1.0.0-rc3", + "version": "2.0.2", "repositorySourceLocation": "https://www.powershellgallery.com/api/v2" } ] diff --git a/whiskey.yml b/whiskey.yml index a08bc18..6789965 100644 --- a/whiskey.yml +++ b/whiskey.yml @@ -7,31 +7,28 @@ Build: - "*": rc1 IncrementPrereleaseVersion: true -- PowerShell: - WorkingDirectory: Carbon.Registry - ExceptDuring: Clean - ScriptBlock: prism install | Format-Table -Auto +# Update the AppVeyor build/version number. +- Exec: appveyor UpdateBuild -Version "$(WHISKEY_SEMVER2)+$(WHISKEY_BUILD_NUMBER)" + .OnlyBy: BuildServer - PowerShell: - ExceptDuring: Clean - Path: init.ps1 + ScriptBlock: | + prism install | Format-Table -Auto + prism install -Path .\Carbon.Registry | Format-Table -Auto + .ExceptDuring: Clean -- PowerShell: - OnlyDuring: Clean - Path: reset.ps1 +- PowerShell: .\init.ps1 + .ExceptDuring: Clean -# Update the AppVeyor build/version number. -- Exec: - OnlyBy: BuildServer - Path: appveyor - Argument: [ UpdateBuild, -Version, "$(WHISKEY_SEMVER2)+$(WHISKEY_BUILD_NUMBER)" ] +- PowerShell: .\reset.ps1 + .OnlyDuring: Clean # Dot-sourcing files is expensive. Move all functions into .psm1 file to improve import speed. Do this before testing # to ensure the module still works. - MergeFile: - OnlyBy: BuildServer + .OnlyBy: BuildServer # Builds run twice on some serves. Only run this step if the module hasn't been merged yet. - IfExists: Carbon.Registry\Functions\*.ps1 + .IfExists: Carbon.Registry\Functions\*.ps1 Path: - Carbon.Registry\Functions\*.ps1 DestinationPath: Carbon.Registry\Carbon.Registry.psm1 @@ -54,10 +51,8 @@ Build: - "*.pdb" - "*.orig" -- Exec: - OnlyBy: BuildServer - Path: appveyor - Argument: [ 'PushArtifact', '.output/Carbon.Registry-$(WHISKEY_SEMVER2).zip', '-DeploymentName', 'GitHub' ] +- Exec: appveyor 'PushArtifact' '.output/Carbon.Registry-$(WHISKEY_SEMVER2).zip' -DeploymentName 'GitHub' + .OnlyBy: BuildServer - Pester: Configuration: @@ -75,12 +70,5 @@ Build: - PublishPowerShellModule: Path: Carbon.Registry -- Exec: - OnlyBy: BuildServer - Path: appveyor - Argument: [ - 'PushArtifact', - '.output/Carbon.Registry.$(WHISKEY_SEMVER2_NO_BUILD_METADATA).nupkg', - '-DeploymentName', - 'PowerShellGallery' - ] +- Exec: appveyor 'PushArtifact' '.output/Carbon.Registry.$(WHISKEY_SEMVER2_NO_BUILD_METADATA).nupkg' -DeploymentName 'PowerShellGallery' + .OnlyBy: BuildServer