Skip to content

Commit

Permalink
Removed target var #2213
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Dec 30, 2023
1 parent 57cb886 commit b6e2a1d
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 73 deletions.
4 changes: 2 additions & 2 deletions tools/hadolint/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "hadolint/hadolint" "v${version}" "hadolint-Linux-${arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/hadolint" \
curl --silent --location --fail --output "${prefix}/bin/hadolint" \
"https://github.com/hadolint/hadolint/releases/download/v${version}/hadolint-Linux-${arch}"
chmod +x "${prefix}${target}/bin/hadolint"
chmod +x "${prefix}/bin/hadolint"
EOF
4 changes: 2 additions & 2 deletions tools/has/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
curl --silent --location --fail --output "${prefix}${target}/bin/has" \
curl --silent --location --fail --output "${prefix}/bin/has" \
"https://github.com/kdabir/has/raw/v${version}/has"
chmod +x "${prefix}${target}/bin/has"
chmod +x "${prefix}/bin/has"
EOF
8 changes: 4 additions & 4 deletions tools/havener/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ARG version
RUN <<EOF
check-github-release-asset "homeport/havener" "v${version}" "havener_${version}_linux_${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/homeport/havener/releases/download/v${version}/havener_${version}_linux_${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
havener
"${prefix}${target}/bin/havener" completion bash >"${prefix}${target}/share/bash-completion/completions/havener"
"${prefix}${target}/bin/havener" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/havener.fish"
"${prefix}${target}/bin/havener" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_havener"
"${prefix}/bin/havener" completion bash >"${prefix}/share/bash-completion/completions/havener"
"${prefix}/bin/havener" completion fish >"${prefix}/share/fish/vendor_completions.d/havener.fish"
"${prefix}/bin/havener" completion zsh >"${prefix}/share/zsh/vendor-completions/_havener"
EOF
8 changes: 4 additions & 4 deletions tools/hcloud/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ARG version
RUN <<EOF
check-github-release-asset "hetznercloud/cli" "v${version}" "hcloud-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/hetznercloud/cli/releases/download/v${version}/hcloud-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
hcloud
"${prefix}${target}/bin/hcloud" completion bash >"${prefix}${target}/share/bash-completion/completions/hcloud"
"${prefix}${target}/bin/hcloud" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/hcloud.fish"
"${prefix}${target}/bin/hcloud" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_hcloud"
"${prefix}/bin/hcloud" completion bash >"${prefix}/share/bash-completion/completions/hcloud"
"${prefix}/bin/hcloud" completion fish >"${prefix}/share/fish/vendor_completions.d/hcloud.fish"
"${prefix}/bin/hcloud" completion zsh >"${prefix}/share/zsh/vendor-completions/_hcloud"
EOF
16 changes: 8 additions & 8 deletions tools/helm-plugins/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ ARG name
ARG version
COPY --link --from=helm / /
RUN <<EOF
echo "export HELM_PLUGINS=${target}/share/helm/plugins" >"${prefix}${target}/etc/profile.d/helm-plugins.sh"
echo "export HELM_PLUGINS=/share/helm/plugins" >"${prefix}/etc/profile.d/helm-plugins.sh"

export HELM_PLUGINS=${prefix}${target}/share/helm/plugins
export HELM_PLUGINS=${prefix}/share/helm/plugins

plugins=(
https://github.com/mstrzele/helm-edit
Expand Down Expand Up @@ -52,11 +52,11 @@ for url in "${plugins[@]}"; do
"${HELM_PLUGINS}/${name}/*.md"
done

helm diff completion bash >"${prefix}${target}/share/bash-completion/completions/helm-diff"
helm diff completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm-diff.fish"
helm diff completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm-diff"
helm diff completion bash >"${prefix}/share/bash-completion/completions/helm-diff"
helm diff completion fish >"${prefix}/share/fish/vendor_completions.d/helm-diff.fish"
helm diff completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-diff"

helm sigstore completion bash >"${prefix}${target}/share/bash-completion/completions/helm-sigstore"
helm sigstore completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm-sigstore.fish"
helm sigstore completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm-sigstore"
helm sigstore completion bash >"${prefix}/share/bash-completion/completions/helm-sigstore"
helm sigstore completion fish >"${prefix}/share/fish/vendor_completions.d/helm-sigstore.fish"
helm sigstore completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-sigstore"
EOF
8 changes: 4 additions & 4 deletions tools/helm/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ARG name
ARG version
RUN <<EOF
curl --silent --location --fail "https://get.helm.sh/helm-v${version}-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --strip-components=1 --no-same-owner \
linux-${alt_arch}/helm
"${prefix}${target}/bin/helm" completion bash >"${prefix}${target}/share/bash-completion/completions/helm"
"${prefix}${target}/bin/helm" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm.fish"
"${prefix}${target}/bin/helm" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm"
"${prefix}/bin/helm" completion bash >"${prefix}/share/bash-completion/completions/helm"
"${prefix}/bin/helm" completion fish >"${prefix}/share/fish/vendor_completions.d/helm.fish"
"${prefix}/bin/helm" completion zsh >"${prefix}/share/zsh/vendor-completions/_helm"
EOF
8 changes: 4 additions & 4 deletions tools/helmfile/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ ARG version

RUN <<EOF
check-github-release-asset "roboll/helmfile" "v${version}" "helmfile_linux_${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/helmfile" \
curl --silent --location --fail --output "${prefix}/bin/helmfile" \
"https://github.com/roboll/helmfile/releases/download/v${version}/helmfile_linux_${alt_arch}"
chmod +x "${prefix}${target}/bin/helmfile"
curl --silent --location --fail --output "${prefix}${target}/share/bash-completion/completions/helmfile" \
chmod +x "${prefix}/bin/helmfile"
curl --silent --location --fail --output "${prefix}/share/bash-completion/completions/helmfile" \
"https://github.com/roboll/helmfile/raw/v${version}/autocomplete/helmfile_bash_autocomplete"
curl --silent --location --fail --output "${prefix}${target}/share/zsh/vendor-completions/_helmfile" \
curl --silent --location --fail --output "${prefix}/share/zsh/vendor-completions/_helmfile" \
"https://github.com/roboll/helmfile/raw/v${version}/autocomplete/helmfile_zsh_autocomplete"
EOF
2 changes: 1 addition & 1 deletion tools/helmify/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ check-github-release-asset "arttor/helmify" "v${version}" "helmify_Linux_${arch_

echo "### Downloading helmify ${version}"
curl --silent --location --fail "https://github.com/arttor/helmify/releases/download/v${version}/helmify_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner
EOF
10 changes: 5 additions & 5 deletions tools/hetzner-k3s/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "vitobotta/hetzner-k3s" "v${version}" "hetzner-k3s-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/hetzner-k3s" \
curl --silent --location --fail --output "${prefix}/bin/hetzner-k3s" \
"https://github.com/vitobotta/hetzner-k3s/releases/download/v${version}/hetzner-k3s-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/hetzner-k3s"
chmod +x "${prefix}/bin/hetzner-k3s"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
4 changes: 2 additions & 2 deletions tools/hexyl/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ check-github-release-asset "sharkdp/hexyl" "v${version}" "hexyl-v${version}-${ar

echo "### Downloading hexyl ${version}"
curl --silent --location --fail "https://github.com/sharkdp/hexyl/releases/download/v${version}/hexyl-v${version}-${arch}-unknown-linux-${suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"hexyl-v${version}-${arch}-unknown-linux-${suffix}/hexyl" \
"hexyl-v${version}-${arch}-unknown-linux-${suffix}/hexyl.1"

mv "${prefix}${target}/bin/hexyl.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/hexyl.1" "${prefix}/share/man/man1/"
EOF
4 changes: 2 additions & 2 deletions tools/htmx/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG name
ARG version
RUN <<EOF
check-download "https://github.com/bigskysoftware/htmx/blob/v${version}/dist/htmx.min.js"
mkdir -p "${prefix}${target}/share/htmx"
curl --silent --location --fail --output "${prefix}${target}/share/htmx/htmx.min.js" \
mkdir -p "${prefix}/share/htmx"
curl --silent --location --fail --output "${prefix}/share/htmx/htmx.min.js" \
"https://github.com/bigskysoftware/htmx/blob/v${version}/dist/htmx.min.js"
EOF
6 changes: 3 additions & 3 deletions tools/httpie/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ EOF
ARG name
ARG version
RUN <<EOF
shiv --output-file "${prefix}${target}/bin/http" --console-script http "httpie==${version}"
shiv --output-file "${prefix}/bin/http" --console-script http "httpie==${version}"

curl --silent --location --fail --output "${prefix}${target}/share/bash-completion/completions/http" \
curl --silent --location --fail --output "${prefix}/share/bash-completion/completions/http" \
"https://github.com/httpie/cli/raw/${version}/extras/httpie-completion.bash"
curl --silent --location --fail --output "${prefix}${target}/share/fish/vendor_completions.d/http.fish" \
curl --silent --location --fail --output "${prefix}/share/fish/vendor_completions.d/http.fish" \
"https://github.com/httpie/cli/raw/${version}/extras/httpie-completion.fish"
EOF
2 changes: 1 addition & 1 deletion tools/httpx/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ check-github-release-asset "projectdiscovery/httpx" "v${version}" "httpx_${versi
url="https://github.com/projectdiscovery/httpx/releases/download/v${version}/httpx_${version}_linux_${alt_arch}.zip"
filename="$(basename "${url}")"
curl --silent --location --fail --remote-name "${url}"
unzip -q -o -d "${prefix}${target}/bin" "${filename}" \
unzip -q -o -d "${prefix}/bin" "${filename}" \
httpx
EOF
2 changes: 1 addition & 1 deletion tools/hub-tool/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ARG version
RUN <<EOF
check-github-release-asset "docker/hub-tool" "v${version}" "hub-tool-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/docker/hub-tool/releases/download/v${version}/hub-tool-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --strip-components=1 --no-same-owner \
hub-tool/hub-tool
EOF
20 changes: 10 additions & 10 deletions tools/hub/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ ARG version
RUN <<EOF
check-github-release-asset "github/hub" "v${version}" "hub-linux-${alt_arch}-${version}.tgz"
curl --silent --location --fail "https://github.com/GrantBirki/hub/releases/download/v${version}/hub-linux-${alt_arch}-${version}.tgz" \
| tar --extract --gzip --directory="${prefix}${target}" --strip-components=1 --no-same-owner
| tar --extract --gzip --directory="${prefix}" --strip-components=1 --no-same-owner
rm -f \
"${prefix}${target}/LICENSE" \
"${prefix}${target}/install" \
"${prefix}${target}/README.md" \
"${prefix}${target}/share/man/man1/*.txt"
mv "${prefix}${target}/etc/hub.bash_completion.sh" "${prefix}${target}/share/bash-completion/completions/hub"
mv "${prefix}${target}/etc/hub.fish_completion" "${prefix}${target}/share/fish/vendor_completions.d/hub.fish"
mv "${prefix}${target}/etc/hub.zsh_completion" "${prefix}${target}/share/zsh/vendor-completions/_hub"
"${prefix}/LICENSE" \
"${prefix}/install" \
"${prefix}/README.md" \
"${prefix}/share/man/man1/*.txt"
mv "${prefix}/etc/hub.bash_completion.sh" "${prefix}/share/bash-completion/completions/hub"
mv "${prefix}/etc/hub.fish_completion" "${prefix}/share/fish/vendor_completions.d/hub.fish"
mv "${prefix}/etc/hub.zsh_completion" "${prefix}/share/zsh/vendor-completions/_hub"
rm -rf \
"${prefix}${target}/share/doc/hub-doc" \
"${prefix}${target}/share/vim"
"${prefix}/share/doc/hub-doc" \
"${prefix}/share/vim"
EOF
8 changes: 4 additions & 4 deletions tools/hubble/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG version
RUN <<EOF
check-github-release-asset "cilium/hubble" "v${version}" "hubble-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/cilium/hubble/releases/download/v${version}/hubble-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner
"${prefix}${target}/bin/hubble" completion bash >"${prefix}${target}/share/bash-completion/completions/hubble"
"${prefix}${target}/bin/hubble" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/hubble.fish"
"${prefix}${target}/bin/hubble" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_hubble"
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner
"${prefix}/bin/hubble" completion bash >"${prefix}/share/bash-completion/completions/hubble"
"${prefix}/bin/hubble" completion fish >"${prefix}/share/fish/vendor_completions.d/hubble.fish"
"${prefix}/bin/hubble" completion zsh >"${prefix}/share/zsh/vendor-completions/_hubble"
EOF
4 changes: 2 additions & 2 deletions tools/huber/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ apt-get -y install --no-install-recommends \
pkg-config
EOF
RUN <<EOF
source "${target}/etc/profile.d/cargo.sh"
source "/etc/profile.d/cargo.sh"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/innobead/huber .
export RUSTFLAGS='-C target-feature=+crt-static'
cargo build --target x86_64-unknown-linux-gnu --release --workspace --exclude=huber-generator
cp target/x86_64-unknown-linux-gnu/release/huber "${prefix}${target}/bin/"
cp target/x86_64-unknown-linux-gnu/release/huber "${prefix}/bin/"
EOF
10 changes: 5 additions & 5 deletions tools/hugo/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ ARG version
RUN <<EOF
check-github-release-asset "gohugoio/hugo" "v${version}" "hugo_extended_${version}_Linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_extended_${version}_Linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
hugo
"${prefix}${target}/bin/hugo" gen man --dir "${prefix}${target}/share/man/man1"
"${prefix}${target}/bin/hugo" completion bash >"${prefix}${target}/share/bash-completion/completions/hugo"
"${prefix}${target}/bin/hugo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/hugo.fish"
"${prefix}${target}/bin/hugo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_hugo"
"${prefix}/bin/hugo" gen man --dir "${prefix}/share/man/man1"
"${prefix}/bin/hugo" completion bash >"${prefix}/share/bash-completion/completions/hugo"
"${prefix}/bin/hugo" completion fish >"${prefix}/share/fish/vendor_completions.d/hugo.fish"
"${prefix}/bin/hugo" completion zsh >"${prefix}/share/zsh/vendor-completions/_hugo"
EOF
8 changes: 4 additions & 4 deletions tools/hurl/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ARG version
RUN <<EOF
check-github-release-asset "Orange-OpenSource/hurl" "${version}" "hurl-${version}-${arch}-unknown-linux-gnu.tar.gz"
curl --silent --location --fail "https://github.com/Orange-OpenSource/hurl/releases/download/${version}/hurl-${version}-${arch}-unknown-linux-gnu.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner
mv \
"${prefix}${target}/bin/hurl.1.gz" \
"${prefix}${target}/bin/hurlfmt.1.gz" \
"${prefix}${target}/share/man/man1/"
"${prefix}/bin/hurl.1.gz" \
"${prefix}/bin/hurlfmt.1.gz" \
"${prefix}/share/man/man1/"
EOF
10 changes: 5 additions & 5 deletions tools/hyperfine/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ check-github-release-asset "sharkdp/hyperfine" "v${version}" "hyperfine-v${versi

echo "### Downloading hyperfine ${version}"
curl --silent --location --fail "https://github.com/sharkdp/hyperfine/releases/download/v${version}/hyperfine-v${version}-${arch}-unknown-linux-${suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"hyperfine-v${version}-${arch}-unknown-linux-${suffix}/hyperfine" \
"hyperfine-v${version}-${arch}-unknown-linux-${suffix}/autocomplete"

echo "### Installing completion"
cp "${prefix}${target}/bin/autocomplete/hyperfine.bash" "${prefix}${target}/share/bash-completion/completions/hyperfine"
cp "${prefix}${target}/bin/autocomplete/hyperfine.fish" "${prefix}${target}/share/fish/vendor_completions.d/hyperfine.fish"
cp "${prefix}${target}/bin/autocomplete/_hyperfine" "${prefix}${target}/share/zsh/vendor-completions/_hyperfine"
rm -rf "${prefix}${target}/bin/autocomplete/"
cp "${prefix}/bin/autocomplete/hyperfine.bash" "${prefix}/share/bash-completion/completions/hyperfine"
cp "${prefix}/bin/autocomplete/hyperfine.fish" "${prefix}/share/fish/vendor_completions.d/hyperfine.fish"
cp "${prefix}/bin/autocomplete/_hyperfine" "${prefix}/share/zsh/vendor-completions/_hyperfine"
rm -rf "${prefix}/bin/autocomplete/"
EOF

0 comments on commit b6e2a1d

Please sign in to comment.