Quellcode durchsuchen

Use the first arch of each entry in "diff-pr.sh"

This allows us to diff "windows-amd64"-only images, but doesn't solve the more general problem of how to cleanly show a diff across all architectures.
Tianon Gravi vor 8 Jahren
Ursprung
Commit
b158337e0c
1 geänderte Dateien mit 15 neuen und 16 gelöschten Zeilen
  1. 15 16
      diff-pr.sh

+ 15 - 16
diff-pr.sh

@@ -107,22 +107,21 @@ sharedTagsListTemplate='
 # TODO something less hacky than "git archive" hackery, like a "bashbrew archive" or "bashbrew context" or something
 template='
 	{{- range $.Entries -}}
-		{{- if .HasArchitecture arch -}}
-			{{- $from := $.DockerFrom . -}}
-			git -C "$BASHBREW_CACHE/git" archive --format=tar
-			{{- " " -}}
-			{{- "--prefix=" -}}
-			{{- $.RepoName -}}
-			_
-			{{- .Tags | last -}}
-			{{- "/" -}}
-			{{- " " -}}
-			{{- .ArchGitCommit arch -}}
-			{{- ":" -}}
-			{{- $dir := .ArchDirectory arch -}}
-			{{- (eq $dir ".") | ternary "" $dir -}}
-			{{- "\n" -}}
-		{{- end -}}
+		{{- $arch := .Architectures | first -}}
+		{{- $from := $.ArchDockerFrom $arch . -}}
+		git -C "$BASHBREW_CACHE/git" archive --format=tar
+		{{- " " -}}
+		{{- "--prefix=" -}}
+		{{- $.RepoName -}}
+		_
+		{{- .Tags | last -}}
+		{{- "/" -}}
+		{{- " " -}}
+		{{- .ArchGitCommit $arch -}}
+		{{- ":" -}}
+		{{- $dir := .ArchDirectory $arch -}}
+		{{- (eq $dir ".") | ternary "" $dir -}}
+		{{- "\n" -}}
 	{{- end -}}
 '