From 85cdcb5aec2edf5b8da079d5c974290cd6d38cbb Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:32:25 -0500 Subject: [PATCH 01/12] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Updates=20Dependenci?= =?UTF-8?q?es=20&=20Version=20Calculation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 14 +++++++------- .github/workflows/validate.yml | 16 ++++++++-------- GitVersion.yml | 3 +++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15d0491..b83133f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,11 +36,11 @@ jobs: uses: actions/checkout@v4 - name: Populate GitVersion variables id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.8.7 + uses: pwshrc/actions-determine-version@v0.9.0 with: mode: 'download' - name: "Get artifact: PSGallery-package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: PSGallery-package path: ./out/ @@ -64,11 +64,11 @@ jobs: uses: actions/checkout@v4 - name: Populate GitVersion variables id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.8.7 + uses: pwshrc/actions-determine-version@v0.9.0 with: mode: 'download' - name: "Get artifact: PSGallery-package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: PSGallery-package path: ./out/ @@ -96,17 +96,17 @@ jobs: uses: actions/checkout@v4 - name: Get GitVersion id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.8.7 + uses: pwshrc/actions-determine-version@v0.9.0 with: mode: 'download' - name: Get release notes id: get-releasenotes - uses: pwshrc/actions-create-release-notes@v0.8.11 + uses: pwshrc/actions-create-release-notes@v0.9.3 with: mode: 'download' github_token: "${{ secrets.GITHUB_TOKEN }}" - name: "Get artifact: PSGallery-package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: PSGallery-package path: ./out/ diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1796ce2..44e562f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Populate GitVersion variables id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.8.7 + uses: pwshrc/actions-determine-version@v0.9.0 with: mode: 'upload' @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Create release notes - uses: pwshrc/actions-create-release-notes@v0.8.11 + uses: pwshrc/actions-create-release-notes@v0.9.3 with: mode: 'upload' github_token: "${{ secrets.GITHUB_TOKEN }}" @@ -48,12 +48,12 @@ jobs: uses: actions/checkout@v4 - name: Populate GitVersion id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.8.7 + uses: pwshrc/actions-determine-version@v0.9.0 with: mode: 'download' - name: Populate release notes id: get-releasenotes - uses: pwshrc/actions-create-release-notes@v0.8.11 + uses: pwshrc/actions-create-release-notes@v0.9.3 with: mode: 'download' github_token: "${{ secrets.GITHUB_TOKEN }}" @@ -73,7 +73,7 @@ jobs: [Version] $moduleVersion = [Version]::new($Env:ModuleVersionMajor, $Env:ModuleVersionMinor, $Env:ModuleVersionPatch) ./build/package.ps1 -PackageVersion $Env:PackageVersion -ModuleVersion $moduleVersion -PackageVersionPrereleaseTag $Env:PackageVersionPrereleaseTag -ReleaseNotes $releaseNotes -CommitSha $Env:CommitSha - name: "Create artifact: PSGallery-package" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: PSGallery-package path: ./out/*.nupkg @@ -107,7 +107,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: "Get artifact: PSGallery-package" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: PSGallery-package path: ./out/ @@ -116,7 +116,7 @@ jobs: with: run: ./build/test.ps1 -UsePackageExport -CI -OutputFilesPrefix "${{ matrix.os }}-" -NoFail:([bool]"${{ matrix.experimental }}") - name: "Create artifact: tests-${{ matrix.os }}" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: "tests-${{ matrix.os }}" @@ -126,7 +126,7 @@ jobs: uses: codecov/codecov-action@v3 if: github.ref == 'refs/heads/main' with: - fail_ci_if_error: true + fail_ci_if_error: false flags: ${{ matrix.codecov_os }},unittests directory: ./out files: "*coverage.xml" diff --git a/GitVersion.yml b/GitVersion.yml index 965c6f8..469d389 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -6,3 +6,6 @@ minor-version-bump-message: '(\+semver:\s?(feature|minor))|^\s*(✨|🏗|⚡| patch-version-bump-message: '(\+semver:\s?(fix|patch))|^\s*(🩹|🚑|🔒|♻|💚|⬆|⬇|🔧|📝|🔥|👷‍♂️|🔨|⏪|🚚|🎨|🚀|💄|✅|🔐|🚨|🚧|📌|📈|🌐|✏️|💩|🔀|📦|👽|🍱|♿|💡|🍻|💬|🗨️|🗃️|🔊|🔉|🔈|🔇|👥|📱|🤡|🥚|🙈|📸|📷|⚗️|🔍|🔎|🌱|🚩|🥅|💫|🗑️|🛂|🧐|⚰️|🧑‍💻|👨‍💻|👩‍💻|💸)' no-bump-message: '\+semver:\s?(none|skip)' assembly-versioning-scheme: MajorMinorPatch +branches: + main: + mode: ContinuousDeployment From 842c1a00854b60a9e7b4ced1e26bd99f5f7ae990 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:51:36 -0500 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20Artifact=20Transfe?= =?UTF-8?q?r=20During=20Release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b83133f..c2c510e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,15 +15,15 @@ jobs: steps: - run: echo "Beginning release." - name: "Transfer 'version-json' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.4.0 + uses: pwshrc/actions-transfer-artifact@v0.5.0 with: name: 'version-json' - name: "Transfer 'PSGallery-package' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.4.0 + uses: pwshrc/actions-transfer-artifact@v0.5.0 with: name: 'PSGallery-package' - name: "Transfer 'release-notes' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.4.0 + uses: pwshrc/actions-transfer-artifact@v0.5.0 with: name: 'release-notes' From b60d351213d01765f62ec59db88bd462ae3899f0 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:12:15 -0500 Subject: [PATCH 03/12] =?UTF-8?q?=E2=AC=86=EF=B8=8FUpgrades=20Codecov=20Co?= =?UTF-8?q?nfiguration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/validate.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 44e562f..e1a3a15 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -123,9 +123,10 @@ jobs: path: ./out/*.xml if-no-files-found: error - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5.1.1 if: github.ref == 'refs/heads/main' with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false flags: ${{ matrix.codecov_os }},unittests directory: ./out From 67faa7f0d03f1b8568ffc9b0300120501f8ca0cc Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:13:54 -0500 Subject: [PATCH 04/12] =?UTF-8?q?=E2=AC=86=EF=B8=8FUpgrades=20action-gh-re?= =?UTF-8?q?lease?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2c510e..45c3078 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,7 +112,7 @@ jobs: path: ./out/ - name: Publish GitHub release id: publish_github_release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2.2.0 with: token: "${{ secrets.RELEASE_GITHUB_TOKEN }}" name: "v${{ steps.gitversion_vars.outputs.SemVer }}" From 0d3d04ab91e4eaf10329059ff8463cff65c3cea0 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:55:16 -0500 Subject: [PATCH 05/12] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Updates=20Pester=20f?= =?UTF-8?q?rom=205.5.0=20to=205.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages.PSGallery.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.PSGallery.config b/packages.PSGallery.config index bac5014..d7f4f13 100644 --- a/packages.PSGallery.config +++ b/packages.PSGallery.config @@ -1,7 +1,7 @@  - + \ No newline at end of file From f97cfe3f8be0f545772dc81c94be3361d2ff920b Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:55:17 -0500 Subject: [PATCH 06/12] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Updates=20PSScriptAn?= =?UTF-8?q?alyzer=20from=201.21.0=20to=201.23.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages.PSGallery.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.PSGallery.config b/packages.PSGallery.config index d7f4f13..f732e2a 100644 --- a/packages.PSGallery.config +++ b/packages.PSGallery.config @@ -3,5 +3,5 @@ - + \ No newline at end of file From e1fe14c6a4b2fd052e6245c85b0390d9ffcaea5a Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:17:56 -0500 Subject: [PATCH 07/12] =?UTF-8?q?=E2=AC=86=EF=B8=8FUpgrades=20Workflow=20D?= =?UTF-8?q?ependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 10 +++++----- .github/workflows/validate.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45c3078..fb2712d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,12 +46,12 @@ jobs: path: ./out/ - name: Publish Prerelease to PSGallery (WhatIf) if: steps.gitversion_vars.outputs.PreReleaseTag != '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -Prerelease -WhatIf - name: Publish Release to PSGallery (WhatIf) if: steps.gitversion_vars.outputs.PreReleaseTag == '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -WhatIf @@ -74,14 +74,14 @@ jobs: path: ./out/ - name: Publish Prerelease to PSGallery if: steps.gitversion_vars.outputs.PreReleaseTag != '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: run: ./build/publish.ps1 -NUGET_KEY "$env:NUGET_KEY" -Prerelease - name: Publish Release to PSGallery if: steps.gitversion_vars.outputs.PreReleaseTag == '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: @@ -101,7 +101,7 @@ jobs: mode: 'download' - name: Get release notes id: get-releasenotes - uses: pwshrc/actions-create-release-notes@v0.9.3 + uses: pwshrc/actions-create-release-notes@v0.9.4 with: mode: 'download' github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e1a3a15..a210b0b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -14,7 +14,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Lint with PSScriptAnalyzer - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 with: run: ./build/lint.ps1 -CI -NoFail:([bool]"${{ secrets.MANDATE_LINT_SUCCESS != 'true' }}") @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Create release notes - uses: pwshrc/actions-create-release-notes@v0.9.3 + uses: pwshrc/actions-create-release-notes@v0.9.4 with: mode: 'upload' github_token: "${{ secrets.GITHUB_TOKEN }}" @@ -53,12 +53,12 @@ jobs: mode: 'download' - name: Populate release notes id: get-releasenotes - uses: pwshrc/actions-create-release-notes@v0.9.3 + uses: pwshrc/actions-create-release-notes@v0.9.4 with: mode: 'download' github_token: "${{ secrets.GITHUB_TOKEN }}" - name: Build PSGallery package - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 env: PackageVersion: ${{ steps.gitversion_vars.outputs.NuGetVersionV2 }} ModuleVersionMajor: ${{ steps.gitversion_vars.outputs.Major }} @@ -112,7 +112,7 @@ jobs: name: PSGallery-package path: ./out/ - name: Test with Pester - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.10 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 with: run: ./build/test.ps1 -UsePackageExport -CI -OutputFilesPrefix "${{ matrix.os }}-" -NoFail:([bool]"${{ matrix.experimental }}") - name: "Create artifact: tests-${{ matrix.os }}" From 9ae4f59dbc7d93d7b6190440c4aff0aeaaeadd9c Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:39:11 -0500 Subject: [PATCH 08/12] =?UTF-8?q?=E2=AC=86=EF=B8=8FUpgrades=20Workflow=20D?= =?UTF-8?q?ependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 8 ++++---- .github/workflows/validate.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb2712d..19bdbd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,12 +46,12 @@ jobs: path: ./out/ - name: Publish Prerelease to PSGallery (WhatIf) if: steps.gitversion_vars.outputs.PreReleaseTag != '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -Prerelease -WhatIf - name: Publish Release to PSGallery (WhatIf) if: steps.gitversion_vars.outputs.PreReleaseTag == '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -WhatIf @@ -74,14 +74,14 @@ jobs: path: ./out/ - name: Publish Prerelease to PSGallery if: steps.gitversion_vars.outputs.PreReleaseTag != '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: run: ./build/publish.ps1 -NUGET_KEY "$env:NUGET_KEY" -Prerelease - name: Publish Release to PSGallery if: steps.gitversion_vars.outputs.PreReleaseTag == '' - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a210b0b..75c2a8f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -14,7 +14,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Lint with PSScriptAnalyzer - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 with: run: ./build/lint.ps1 -CI -NoFail:([bool]"${{ secrets.MANDATE_LINT_SUCCESS != 'true' }}") @@ -58,7 +58,7 @@ jobs: mode: 'download' github_token: "${{ secrets.GITHUB_TOKEN }}" - name: Build PSGallery package - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 env: PackageVersion: ${{ steps.gitversion_vars.outputs.NuGetVersionV2 }} ModuleVersionMajor: ${{ steps.gitversion_vars.outputs.Major }} @@ -112,7 +112,7 @@ jobs: name: PSGallery-package path: ./out/ - name: Test with Pester - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.0 + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.3.1 with: run: ./build/test.ps1 -UsePackageExport -CI -OutputFilesPrefix "${{ matrix.os }}-" -NoFail:([bool]"${{ matrix.experimental }}") - name: "Create artifact: tests-${{ matrix.os }}" From 8b92f6a0b84469d26c5a9d73a37e9af9ed1685cb Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:58:43 -0500 Subject: [PATCH 09/12] =?UTF-8?q?=E2=AC=87=EF=B8=8FDowngrades=20action-gh-?= =?UTF-8?q?release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version 2.2 of ction-gh-release contains a bug preventing upload of our NuGet artifacts. For more information, see: https://github.com/softprops/action-gh-release/issues/555 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19bdbd5..e6dc97b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,7 +112,7 @@ jobs: path: ./out/ - name: Publish GitHub release id: publish_github_release - uses: softprops/action-gh-release@v2.2.0 + uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 with: token: "${{ secrets.RELEASE_GITHUB_TOKEN }}" name: "v${{ steps.gitversion_vars.outputs.SemVer }}" From 5d886ec6b6f862da162b518f2fa42a649e4ce675 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:17:45 -0500 Subject: [PATCH 10/12] =?UTF-8?q?=E2=AC=86=EF=B8=8FUpdates=20Dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages.PSGallery.config | 4 ++-- src/poshy-wrap-python.psm1 | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages.PSGallery.config b/packages.PSGallery.config index f732e2a..2468a85 100644 --- a/packages.PSGallery.config +++ b/packages.PSGallery.config @@ -1,7 +1,7 @@  - + - \ No newline at end of file + diff --git a/src/poshy-wrap-python.psm1 b/src/poshy-wrap-python.psm1 index 5bcd090..bdbf9e8 100644 --- a/src/poshy-wrap-python.psm1 +++ b/src/poshy-wrap-python.psm1 @@ -1,6 +1,7 @@ #!/usr/bin/env pwsh $ErrorActionPreference = "Stop" Set-StrictMode -Version Latest +#Requires -Modules @{ ModuleName = "poshy-lucidity"; RequiredVersion = "0.4.1" } Get-ChildItem -Path "$PSScriptRoot/*.ps1" | ForEach-Object { From f73052103573d55cab29d46910dadde783d4119f Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:27:20 -0500 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=9A=A8=20Fixes=20Version=20Calculat?= =?UTF-8?q?ion=20for=20Test=20Builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/package-dev.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build/package-dev.ps1 b/build/package-dev.ps1 index da1dd35..6b249e6 100644 --- a/build/package-dev.ps1 +++ b/build/package-dev.ps1 @@ -20,7 +20,19 @@ elseif (Get-Command gitversion -ErrorAction SilentlyContinue) { if ($gitversion_bin) { [PSObject] $versionInfo = & $gitversion_bin | ConvertFrom-Json - [string] $PackageVersion = $versionInfo | Select-Object -ExpandProperty NuGetVersionV2 + [string] $paddedNumberFormatPattern = "0000" + [string] $prereleaseLabelShortened = ($versionInfo.PreReleaseLabel.Length -gt 16) ? $versionInfo.PreReleaseLabel.Substring(0, 16) : $versionInfo.PreReleaseLabel + # TODO: Verify 'PreReleaseNumber' is correct suffix. Ambiguous from historical documentation found at https://github.com/GitTools/GitVersion/blob/v4.0.0/docs/more-info/variables.md. + [Nullable[int]] $preReleaseNumber = $versionInfo.PreReleaseNumber -as [int] + if ($preReleaseNumber -and $versionInfo.PreReleaseLabel) { + [string] $LegacySemVer = $versionInfo.MajorMinorPatch + "-" + $versionInfo.PreReleaseLabel + $preReleaseNumber + [string] $LegacySemVerPadded = $versionInfo.MajorMinorPatch + "-" + $prereleaseLabelShortened + $preReleaseNumber.ToString($paddedNumberFormatPattern) + } else { + [string] $LegacySemVer = $versionInfo.MajorMinorPatch + [string] $LegacySemVerPadded = $versionInfo.MajorMinorPatch + } + [string] $PackageVersion = $LegacySemVerPadded + [string] $PackageVersionPrereleaseTag = $versionInfo | Select-Object -ExpandProperty PreReleaseTag [string] $assemblySemVer = $versionInfo | Select-Object -ExpandProperty AssemblySemVer [string] $CommitSha = $versionInfo | Select-Object -ExpandProperty Sha From bd185c22cd795402364cd62c2740e8a5ad77e51a Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:59:17 -0500 Subject: [PATCH 12/12] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Splits=20PSM1,=20?= =?UTF-8?q?Removes=20`#Requires`=20from=20PSM1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests were failing because the module was not importable. The `#Requires` syntax being used in the root PSM1 prevented dependencies from being fully resolved before the module loading could complete, making the module unusable. --- src/{_python3.ps1 => poshy-wrap-python.ps1} | 9 +++++++++ src/poshy-wrap-python.psm1 | 12 +----------- 2 files changed, 10 insertions(+), 11 deletions(-) rename src/{_python3.ps1 => poshy-wrap-python.ps1} (54%) diff --git a/src/_python3.ps1 b/src/poshy-wrap-python.ps1 similarity index 54% rename from src/_python3.ps1 rename to src/poshy-wrap-python.ps1 index 1055dec..89320e4 100644 --- a/src/_python3.ps1 +++ b/src/poshy-wrap-python.ps1 @@ -1,6 +1,7 @@ #!/usr/bin/env pwsh $ErrorActionPreference = "Stop" Set-StrictMode -Version Latest +#Requires -Modules @{ ModuleName = "poshy-lucidity"; RequiredVersion = "0.4.1" } function _python3() { @@ -20,3 +21,11 @@ function pyserver { Set-Alias -Name python3 -Value _python3 Set-Alias -Name py -Value _python3 Set-Alias -Name python -Value _python3 + + +if ((Test-Command ipython3) -or (Get-Variable -Name PWSHRC_FORCE_MODULES_EXPORT_UNSUPPORTED -Scope Global -ValueOnly -ErrorAction SilentlyContinue)) { + Set-Alias -Name ipy -Value ipython3 + Set-Alias -Name ipython -Value ipython3 +} + +Export-ModuleMember -Function * -Alias * diff --git a/src/poshy-wrap-python.psm1 b/src/poshy-wrap-python.psm1 index bdbf9e8..f368097 100644 --- a/src/poshy-wrap-python.psm1 +++ b/src/poshy-wrap-python.psm1 @@ -1,16 +1,6 @@ #!/usr/bin/env pwsh $ErrorActionPreference = "Stop" Set-StrictMode -Version Latest -#Requires -Modules @{ ModuleName = "poshy-lucidity"; RequiredVersion = "0.4.1" } -Get-ChildItem -Path "$PSScriptRoot/*.ps1" | ForEach-Object { - . $_.FullName -} - -if ((Test-Command ipython3) -or (Get-Variable -Name PWSHRC_FORCE_MODULES_EXPORT_UNSUPPORTED -Scope Global -ValueOnly -ErrorAction SilentlyContinue)) { - Set-Alias -Name ipy -Value ipython3 - Set-Alias -Name ipython -Value ipython3 -} - -Export-ModuleMember -Function * -Alias * +. "$PSScriptRoot/poshy-wrap-python.ps1"