Skip to content

Commit

Permalink
Merge pull request #36 from theohbrothers/style/tidy-up-defintions-an…
Browse files Browse the repository at this point in the history
…d-templates

Style: Tidy up defintions and templates
  • Loading branch information
leojonathanoh authored Jun 29, 2023
2 parents edfb436 + be4567f commit 9b70595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $local:VARIANTS_MATRIX = @(
subvariants = @(
@{ components = @() }
@{ components = @( 'jq', 'sops', 'ssh' ) }
@{ components = @( 'jq', 'libvirt', 'sops', 'ssh' )}
@{ components = @( 'jq', 'libvirt', 'sops', 'ssh' ) }
)
}
}
Expand All @@ -56,10 +56,10 @@ $VARIANTS = @(
}
components = $subVariant['components']
}
# Docker image tag. E.g. 'v1.5.2-alpine-3.6'
# Docker image tag. E.g. 'v1.5.2'
tag = @(
"v$( $variant['package_version'] )"
$subVariant['components'] | ? { $_ }
"v$( $variant['package_version'] )"
$subVariant['components'] | ? { $_ }
) -join '-'
tag_as_latest = if ($variant['package_version'] -eq $local:PACKAGE_VERSIONS[0] -and $subVariant['components'].Count -eq 0) { $true } else { $false }
}
Expand Down
2 changes: 1 addition & 1 deletion generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ RUN set -eux; \
"@


if ($o['archiveformat'] -match '\.tar\.gz|\.tgz') {
if ($o['archivefiles'].Count -gt 0) {
@"
Expand Down Expand Up @@ -143,6 +142,7 @@ RUN set -eux; \
"@
}

$destination = if ($o.Contains('destination')) { $o['destination'] } else { "/usr/local/bin/$( $o['binary'] )" }
$destinationDir = Split-Path $destination -Parent
@"
Expand Down

0 comments on commit 9b70595

Please sign in to comment.