Skip to content

Commit

Permalink
Merge pull request #84 from theohbrothers/enhancement/remove-v-prefix…
Browse files Browse the repository at this point in the history
…-from-versions-in-commit-message-in-new-dockerimagevariantspr

Enhancement: Remove `v` prefix from versions in commit message in `New-DockerImageVariantsPR`
  • Loading branch information
leojonathanoh authored Sep 21, 2023
2 parents dc03d12 + 525535d commit 483f71c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Describe "New-DockerImageVariantsPR" -Tag 'Unit' {
ref = 'master'
}
head = [pscustomobject]@{
ref = "enhancement/add-v$version-variants"
ref = "enhancement/add-$version-variants"
}
}
}
Expand All @@ -59,7 +59,7 @@ Describe "New-DockerImageVariantsPR" -Tag 'Unit' {
ref = 'master'
}
head = [pscustomobject]@{
ref = "enhancement/bump-v$( $Version.Major ).$( $Version.Minor )-variants-to-v$( $VersionNew )"
ref = "enhancement/bump-$( $Version.Major ).$( $Version.Minor )-variants-to-$( $VersionNew )"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function New-DockerImageVariantsPR {
{ Generate-DockerImageVariants . } | Execute-Command | Write-Host
}
$BRANCH = if ($Verb -eq 'add') {
"enhancement/add-v$( $Version.Major ).$( $Version.Minor ).$( $Version.Build )-variants"
"enhancement/add-$( $Version.Major ).$( $Version.Minor ).$( $Version.Build )-variants"
}elseif ($Verb -eq 'update') {
"enhancement/bump-v$( $Version.Major ).$( $Version.Minor )-variants-to-v$( $VersionNew )"
"enhancement/bump-$( $Version.Major ).$( $Version.Minor )-variants-to-$( $VersionNew )"
}
$COMMIT_MSG = if ($Verb -eq 'add') {
"Enhancement: Add v$( $Version.Major ).$( $Version.Minor ).$( $Version.Build ) variants"
"Enhancement: Add $( $Version.Major ).$( $Version.Minor ).$( $Version.Build ) variants"
}elseif ($Verb -eq 'update') {
"Enhancement: Bump v$( $Version.Major ).$( $Version.Minor ) variants to v$( $VersionNew )"
"Enhancement: Bump $( $Version.Major ).$( $Version.Minor ) variants to $( $VersionNew )"
}
$existingBranch = { git rev-parse --verify $BRANCH } | Execute-Command -ErrorAction Continue
if ($existingBranch) {
Expand Down

0 comments on commit 483f71c

Please sign in to comment.