File tree Expand file tree Collapse file tree 2 files changed +34
-21
lines changed Expand file tree Collapse file tree 2 files changed +34
-21
lines changed Original file line number Diff line number Diff line change 1+ "Maintainers: Tianon Gravi <tianon@tianon.xyz> (@tianon)" ,
2+ "GitRepo: https://github.com/tianon/docker-postgres-upgrade.git" ,
3+ "GitCommit: \( $commit ) " ,
4+
5+ (
6+ first (. [].new ) as $newest
7+
8+ | to_entries []
9+
10+ | if $ARGS .positional | length > 0 then
11+ select (IN (.key ; $ARGS .positional []))
12+ else . end
13+
14+ | (
15+ "" ,
16+ "Tags: \( .key ) " ,
17+ "Directory: \( .key ) " ,
18+ "Architectures: \(
19+ if .value.new == $newest then
20+ # only the newest (target) version gets more than one architecture
21+ # https://github.com/tianon/docker-postgres-upgrade/issues/99#issuecomment-3235566575
22+ "amd64, arm64v8"
23+ # TODO update "versions.sh" to also scrape/keep "Architectures" data from the upstream bashbrew files so this doesn't ever accidentally include things that don't exist or shouldn't be supported
24+ else "amd64" end
25+ ) " ,
26+ empty
27+ )
28+ )
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -Eeuo pipefail
33
4- self=" $( basename " $BASH_SOURCE " ) "
54cd " $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
65
7- if [ " $# " -eq 0 ]; then
8- versions=" $( jq -r ' keys_unsorted | map(@sh) | join(" ")' versions.json) "
9- eval " set -- $versions "
10- fi
11-
126commit=" $( git log -1 --format=' format:%H' HEAD) "
137
14- cat << -EOH
15- Maintainers: Tianon Gravi <tianon@tianon.xyz> (@tianon)
16- GitRepo: https://github.com/tianon/docker-postgres-upgrade.git
17- GitCommit: $commit
18- EOH
19-
20- for version; do
21- export version
22-
23- cat << -EOE
24-
25- Tags: $version
26- Directory: $version
27- EOE
28- done
8+ exec jq \
9+ --raw-output \
10+ --arg commit " $commit " \
11+ --from-file generate-stackbrew-library.jq \
12+ versions.json \
13+ --args -- " $@ "
You can’t perform that action at this time.
0 commit comments