From be4567f06aa6169657a0ba6b2a972df8c1ebf59c Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Thu, 29 Jun 2023 19:40:24 +0000 Subject: [PATCH] Style: Tidy up defintions and templates --- generate/definitions/VARIANTS.ps1 | 8 ++++---- generate/templates/Dockerfile.ps1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 3e38673..8e0f80e 100755 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -33,7 +33,7 @@ $local:VARIANTS_MATRIX = @( subvariants = @( @{ components = @() } @{ components = @( 'jq', 'sops', 'ssh' ) } - @{ components = @( 'jq', 'libvirt', 'sops', 'ssh' )} + @{ components = @( 'jq', 'libvirt', 'sops', 'ssh' ) } ) } } @@ -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 } } diff --git a/generate/templates/Dockerfile.ps1 b/generate/templates/Dockerfile.ps1 index 4063f3f..efbac88 100644 --- a/generate/templates/Dockerfile.ps1 +++ b/generate/templates/Dockerfile.ps1 @@ -112,7 +112,6 @@ RUN set -eux; \ "@ - if ($o['archiveformat'] -match '\.tar\.gz|\.tgz') { if ($o['archivefiles'].Count -gt 0) { @" @@ -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 @"