Skip to content

Commit

Permalink
Merge pull request #110 from leojonathanoh/fix/fix-versions.json-typos
Browse files Browse the repository at this point in the history
Fix: Fix `versions.json` typos
  • Loading branch information
leojonathanoh authored Feb 17, 2024
2 parents 1552a02 + ce23b6f commit 1d6f629
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -79,15 +79,15 @@ 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
$item | Should -Be $null
$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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 @"
Expand All @@ -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 @"
Expand All @@ -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 @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d6f629

Please sign in to comment.