Skip to content

Commit

Permalink
Make downloaded "template-helper-functions.jq" a hidden file
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Dec 8, 2023
1 parent a0ef1ac commit de1dd6e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.jq-template.awk
template-helper-functions.jq
.template-helper-functions.jq
2 changes: 1 addition & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Alpine Linux is not officially supported by the RabbitMQ team -- use at your own risk!
{{ include "template-helper-functions" }}
{{ include ".template-helper-functions" }}
FROM alpine:{{ .alpine.version }} as build-base

RUN apk add --no-cache \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ubuntu.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The official Canonical Ubuntu Focal image is ideal from a security perspective,
# especially for the enterprises that we, the RabbitMQ team, have to deal with
{{ include "template-helper-functions" }}
{{ include ".template-helper-functions" }}
FROM ubuntu:{{ .ubuntu.version }} as build-base

ARG BUILDKIT_SBOM_SCAN_STAGE=true
Expand Down
6 changes: 4 additions & 2 deletions apply-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ elif [ "$BASH_SOURCE" -nt "$jqt" ]; then
wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk'
fi

jqf='template-helper-functions.jq'
if [ "$BASH_SOURCE" -nt "$jqf" ]; then
jqf='.template-helper-functions.jq'
if [ -n "${BASHBREW_SCRIPTS:-}" ]; then
jqf="$BASHBREW_SCRIPTS/template-helper-functions.jq"
elif [ "$BASH_SOURCE" -nt "$jqf" ]; then
# https://github.com/docker-library/bashbrew/blob/master/scripts/template-helper-functions.jq
wget -qO "$jqf" 'https://github.com/docker-library/bashbrew/raw/5a86c34c5a3ef370b3d22c398d45ccab53bd64bd/scripts/template-helper-functions.jq'
fi
Expand Down

0 comments on commit de1dd6e

Please sign in to comment.