From ce23b6f2c3049a2fd3d1af8c68e4a978e4dccfcd Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Sat, 17 Feb 2024 17:33:53 +0000 Subject: [PATCH] Fix: Fix `versions.json` typos --- .../public/New-DockerImageVariantsVersions.Tests.ps1 | 8 ++++---- .../public/Set-DockerImageVariantsVersions.Tests.ps1 | 8 ++++---- .../public/Update-DockerImageVariantsVersions.ps1 | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Generate-DockerImageVariantsHelpers/public/New-DockerImageVariantsVersions.Tests.ps1 b/src/Generate-DockerImageVariantsHelpers/public/New-DockerImageVariantsVersions.Tests.ps1 index 7e509b9..021e300 100644 --- a/src/Generate-DockerImageVariantsHelpers/public/New-DockerImageVariantsVersions.Tests.ps1 +++ b/src/Generate-DockerImageVariantsHelpers/public/New-DockerImageVariantsVersions.Tests.ps1 @@ -53,7 +53,7 @@ Describe "New-DockerImageVariantsVersions" { } | Should -Throw } - It "Creates version.json (-VersionsChangeScope minor)" { + It "Creates versions.json (-VersionsChangeScope minor)" { $item = New-DockerImageVariantsVersions -Package foo -VersionsChangeScope minor -VersionsNewScript { Some-VersionNewScript } -ErrorVariable err $item | Should -Not -Be $null @@ -66,7 +66,7 @@ Describe "New-DockerImageVariantsVersions" { $err | Should -Be $null } - It "Creates version.json (-VersionsChangeScope patch)" { + It "Creates versions.json (-VersionsChangeScope patch)" { $item = New-DockerImageVariantsVersions -Package foo -VersionsChangeScope patch -VersionsNewScript { Some-VersionNewScript } -ErrorVariable err $item | Should -Not -Be $null @@ -79,7 +79,7 @@ Describe "New-DockerImageVariantsVersions" { $err | Should -Be $null } - It "Creates version.json (-WhatIf)" { + It "Creates versions.json (-WhatIf)" { $item = New-DockerImageVariantsVersions -Package foo -VersionsChangeScope minor -VersionsNewScript { Some-VersionNewScript } -ErrorVariable err -WhatIf 6>$null Test-Path $VERSIONS_JSON_FILE | Should -Be $false @@ -87,7 +87,7 @@ Describe "New-DockerImageVariantsVersions" { $err | Should -Be $null } - It "Errors if version.json already exists" { + It "Errors if versions.json already exists" { New-Item $VERSIONS_JSON_FILE -ItemType File -Force > $null $item = New-DockerImageVariantsVersions -Package foo -VersionsChangeScope minor -VersionsNewScript { Some-VersionNewScript } -ErrorVariable err 2>$null diff --git a/src/Generate-DockerImageVariantsHelpers/public/Set-DockerImageVariantsVersions.Tests.ps1 b/src/Generate-DockerImageVariantsHelpers/public/Set-DockerImageVariantsVersions.Tests.ps1 index ce11581..3a09966 100644 --- a/src/Generate-DockerImageVariantsHelpers/public/Set-DockerImageVariantsVersions.Tests.ps1 +++ b/src/Generate-DockerImageVariantsHelpers/public/Set-DockerImageVariantsVersions.Tests.ps1 @@ -48,7 +48,7 @@ Describe "Set-DockerImageVariantsVersions" { } | Should -Throw } - It "Sets version.json" { + It "Sets versions.json" { Set-DockerImageVariantsVersions '0.1.0' 6>$null Get-Content $VERSIONS_JSON_FILE -Raw | Should -Be @" @@ -64,13 +64,13 @@ Describe "Set-DockerImageVariantsVersions" { "@ } - It "Sets version.json (-WhatIf)" { + It "Sets versions.json (-WhatIf)" { Set-DockerImageVariantsVersions '0.1.0' -WhatIf >$null 6>$null Test-Path $VERSIONS_JSON_FILE | Should -Be $false } - It "Sets version.json with an empty array (first arg)" { + It "Sets versions.json with an empty array (first arg)" { Set-DockerImageVariantsVersions @() 6>$null Get-Content $VERSIONS_JSON_FILE -Raw | Should -Be @" @@ -79,7 +79,7 @@ Describe "Set-DockerImageVariantsVersions" { "@ } - It "Sets version.json with a non-empty array" { + It "Sets versions.json with a non-empty array" { Set-DockerImageVariantsVersions -Versions @( '0.1.0', '0.2.0' ) 6>$null Get-Content $VERSIONS_JSON_FILE -Raw | Should -Match @" diff --git a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 index d6e0bfa..985c99e 100644 --- a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 +++ b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 @@ -6,7 +6,7 @@ function Update-DockerImageVariantsVersions { [Parameter(ParameterSetName='Pipeline')] [scriptblock]$CommitPreScriptblock , - [Parameter(HelpMessage="Whether to open a PR for each updated version in version.json")] + [Parameter(HelpMessage="Whether to open a PR for each updated version in versions.json")] [Parameter(ParameterSetName='Default')] [Parameter(ParameterSetName='Pipeline')] [switch]$PR