Merge pull request #1343 from infosiftr/archfile

Add "ArchFile" for differing "File:" values
This commit is contained in:
yosifkit 2018-10-25 13:39:30 -07:00 committed by GitHub
commit a03ddae4ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -28,7 +28,8 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
- {{- "\t" -}} - {{- "\t" -}}
{{- if $isGitHub -}} [ {{- end -}} {{- if $isGitHub -}} [ {{- end -}}
{{- $dir := .ArchDirectory $arch -}} {{- $dir := .ArchDirectory $arch -}}
{{- $dockerfilePath := eq $dir "." | ternary "Dockerfile" (join "/" $dir "Dockerfile") -}} {{- $dockerfile := .ArchFile $arch -}}
{{- $dockerfilePath := eq $dir "." | ternary $dockerfile (join "/" $dir $dockerfile) -}}
` {{- $e.Tags | join "`, `" -}} ` (* {{- $dockerfilePath -}} *) ` {{- $e.Tags | join "`, `" -}} ` (* {{- $dockerfilePath -}} *)
{{- $gitCommit := $e.ArchGitCommit $arch -}} {{- $gitCommit := $e.ArchGitCommit $arch -}}
{{- if $isGitHub -}} ]( {{- $repoUrlBase -}} /blob/ {{- $gitCommit -}} / {{- $dockerfilePath -}} ) {{- end -}} {{- if $isGitHub -}} ]( {{- $repoUrlBase -}} /blob/ {{- $gitCommit -}} / {{- $dockerfilePath -}} ) {{- end -}}
@ -60,7 +61,8 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
{{- "\t-\t" -}} {{- "\t-\t" -}}
{{- if $isGitHub -}} [ {{- end -}} {{- if $isGitHub -}} [ {{- end -}}
{{- $dir := .ArchDirectory $arch -}} {{- $dir := .ArchDirectory $arch -}}
{{- $dockerfilePath := ternary "Dockerfile" (join "/" $dir "Dockerfile") (eq $dir ".") -}} {{- $dockerfile := .ArchFile $arch -}}
{{- $dockerfilePath := eq $dir "." | ternary $dockerfile (join "/" $dir $dockerfile) -}}
` {{- $e.Tags | first -}} ` (* {{- $dockerfilePath -}} *) ` {{- $e.Tags | first -}} ` (* {{- $dockerfilePath -}} *)
{{- $gitCommit := $e.ArchGitCommit $arch -}} {{- $gitCommit := $e.ArchGitCommit $arch -}}
{{- if $isGitHub -}} ]( {{- $repoUrlBase -}} /blob/ {{- $gitCommit -}} / {{- $dockerfilePath -}} ) {{- end -}} {{- if $isGitHub -}} ]( {{- $repoUrlBase -}} /blob/ {{- $gitCommit -}} / {{- $dockerfilePath -}} ) {{- end -}}