diff --git a/CHANGELOG.md b/CHANGELOG.md index abc055f..5f4144f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ # Changelog -> - v0.0.1, 26.11.2020 -- Initial release. +> - v0.0.2, 06.01.2021 +> - Changed url's to new github repo. +> - Added code signing step in build process. +> - Signed module with a code signing certificate. + +> - v0.0.1, 26.11.2020 +> - Initial release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0cb1fcd..b62bc8a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ We use `..` as versioning policy. = Backwards Compatible / Bug Fixes ``` -For the versions available, see the [tags on this repository](https://github.com/netcloudag/powershell-cli-menu-helpers/tags). +For the versions available, see the [tags on this repository](https://github.com/netcloud/powershell-cli-menu-helpers/tags). ### Coding Convention diff --git a/README.md b/README.md index 66942a9..ec1bf9d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,21 @@ # powershell cli menu helpers -[[_TOC_]] +- [powershell cli menu helpers](#powershell-cli-menu-helpers) + - [Introduction](#introduction) + - [Installation](#installation) + - [From PowerShell Gallery](#from-powershell-gallery) + - [From Source](#from-source) + - [Usage](#usage) + - [Menu rendering](#menu-rendering) + - [List rendering](#list-rendering) + - [Table rendering](#table-rendering) + - [Example](#example) + - [Contributing](#contributing) + - [Creating a release](#creating-a-release) + - [Requirements](#requirements) + - [Steps](#steps) + - [Authors](#authors) + - [License](#license) ## Introduction @@ -31,7 +46,7 @@ Install-Module -Name 'powershell-cli-menu-helpers' - Obtain the source ``` -git clone https://github.com/netcloudag/powershell-cli-menu-helpers.git +git clone https://github.com/netcloud/powershell-cli-menu-helpers.git ``` - Navigate to the source directory @@ -146,7 +161,7 @@ cd .\example\ ## Contributing -Contributions are welcome, please refere to [CONTRIBUTING.md](https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/CONTRIBUTING.md) for details. +Contributions are welcome, please refere to [CONTRIBUTING.md](https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/CONTRIBUTING.md) for details. ## Creating a release @@ -161,8 +176,8 @@ Install-Module -Name 'PSScriptAnalyzer' - Add / modify the test cases inside the folder `.\tests` - Run the tests (`.\test.ps1`) -- Update the [CHANGELOG.md](https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/CHANGELOG.md) -- Update the `ModuleVersion` inside the [config.json](https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/config.json) +- Update the [CHANGELOG.md](https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/CHANGELOG.md) +- Update the `ModuleVersion` inside the [config.json](https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/config.json) - Add release tag on github - Run the script `.\build.ps1` to create a new build - Run the scirpt `.\publish.ps1` to publish the build to PowerShell Gallery @@ -175,4 +190,4 @@ Install-Module -Name 'PSScriptAnalyzer' ## License This project is licensed under MIT with Copyright (c) 2020 Netcloud AG. \ -See the [LICENSE.md](https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/LICENSE.md) file for details. +See the [LICENSE.md](https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/LICENSE.md) file for details. diff --git a/build.ps1 b/build.ps1 index 432715d..5c76a5d 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,16 @@ #Requires -Version 5.1 $ErrorActionPreference = 'Stop' +# Get cert path +[System.String]$CertPath = Read-Host -Prompt 'Please enter cert path (Cert:\CurrentUser\My\71C28FC065F(...)367825B1AF)' + +if (-not (Test-Path -Path $CertPath)) { + Write-Host -Object "Cert $CertPath not found!" + return +} + +$Cert = Get-Item -Path $CertPath + # Remove old build if available if (Test-Path -Path '.\build') { Remove-Item -Path '.\build' -Recurse -Force @@ -40,4 +50,9 @@ Set-Content -Path ('.\build\' + $Config.ModuleName + '\' + $Config.ModuleName + # Create the powershell module foreach ($Funciton in (Get-ChildItem -Path '.\functions')) { Get-Content -Path $Funciton.FullName -Raw | Add-Content -Path ('.\build\' + $Config.ModuleName + '\' + $Config.ModuleName + '.psm1') +} + +# Sign the generated files +foreach ($File in (Get-ChildItem -Path '.\build\*' -Recurse)) { + Set-AuthenticodeSignature -FilePath $File.FullName -Certificate $Cert -TimestampServer 'http://timestamp.digicert.com' } \ No newline at end of file diff --git a/config.json b/config.json index b6cd498..e6eb926 100644 --- a/config.json +++ b/config.json @@ -1,22 +1,25 @@ { "ModuleName": "powershell-cli-menu-helpers", - "ModuleVersion": "0.0.1", + "ModuleVersion": "0.0.2", "GUID": "2876be78-754c-4b00-b390-d871c61ce66b", "Author": "Patrick Grazioli", "CompanyName": "Netcloud AG", "Copyright": "2020 Netcloud AG. All rights reserved.", - "LicenseUri": "https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/LICENSE.md", - "Description": "https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/README.md", + "LicenseUri": "https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/LICENSE.md", + "Description": "https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/README.md", "PowerShellVersion": "5.1", - "ProjectUri": "https://github.com/netcloudag/powershell-cli-menu-helpers", - "ReleaseNotes": "https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/CHANGELOG.md", + "ProjectUri": "https://github.com/netcloud/powershell-cli-menu-helpers", + "ReleaseNotes": "https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/CHANGELOG.md", "Tags": [ "cli-menu", "menu", "select-item", "list-item", "filter-item", - "cli-menu-helpers" + "cli-menu-helpers", + "cli", + "select", + "filter" ], - "IconUri": "https://github.com/netcloudag/powershell-cli-menu-helpers/blob/master/assets/images/ncdev_logo.png" + "IconUri": "https://github.com/netcloud/powershell-cli-menu-helpers/blob/master/assets/images/ncdev_logo.png" } diff --git a/functions/Select-ItemFromList.ps1 b/functions/Select-ItemFromList.ps1 index 242f26b..c63ff8e 100644 --- a/functions/Select-ItemFromList.ps1 +++ b/functions/Select-ItemFromList.ps1 @@ -64,7 +64,7 @@ } .LINK - https://github.com/netcloudag/powershell-cli-menu-helpers + https://github.com/netcloud/powershell-cli-menu-helpers #> [OutputType([System.Management.Automation.PSObject[]])] Param( diff --git a/functions/Select-ItemFromTable.ps1 b/functions/Select-ItemFromTable.ps1 index f27e87d..d3d8638 100644 --- a/functions/Select-ItemFromTable.ps1 +++ b/functions/Select-ItemFromTable.ps1 @@ -67,7 +67,7 @@ } .LINK - https://github.com/netcloudag/powershell-cli-menu-helpers + https://github.com/netcloud/powershell-cli-menu-helpers #> [OutputType([System.Management.Automation.PSObject[]])] Param( diff --git a/functions/Select-MenuEntryFromList.ps1 b/functions/Select-MenuEntryFromList.ps1 index 36a8fea..a167a5d 100644 --- a/functions/Select-MenuEntryFromList.ps1 +++ b/functions/Select-MenuEntryFromList.ps1 @@ -61,7 +61,7 @@ } .LINK - https://github.com/netcloudag/powershell-cli-menu-helpers + https://github.com/netcloud/powershell-cli-menu-helpers #> [OutputType([System.Management.Automation.PSObject[]])] Param(