mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
deployment: update get-envoy script and release hooks (#2111)
This commit is contained in:
parent
3b1e5a9a48
commit
2b59db27be
2 changed files with 8 additions and 21 deletions
7
.github/goreleaser.yaml
vendored
7
.github/goreleaser.yaml
vendored
|
@ -39,10 +39,13 @@ builds:
|
||||||
- -X github.com/pomerium/pomerium/internal/version.ProjectURL=https://wwww.pomerium.io
|
- -X github.com/pomerium/pomerium/internal/version.ProjectURL=https://wwww.pomerium.io
|
||||||
|
|
||||||
hooks:
|
hooks:
|
||||||
|
pre:
|
||||||
|
- cmd: ./scripts/get-envoy.bash
|
||||||
|
env:
|
||||||
|
- TARGET={{ .Os }}-{{ .Arch }}
|
||||||
|
- DIR={{ dir .Path }}
|
||||||
post:
|
post:
|
||||||
- cmd: ./scripts/embed-envoy.bash {{ .Path }}
|
- cmd: ./scripts/embed-envoy.bash {{ .Path }}
|
||||||
env: # e.g. darwin_amd64
|
|
||||||
- TARGET={{ .Target }}
|
|
||||||
|
|
||||||
- id: pomerium-cli
|
- id: pomerium-cli
|
||||||
main: ./cmd/pomerium-cli
|
main: ./cmd/pomerium-cli
|
||||||
|
|
|
@ -5,17 +5,8 @@ PATH="$PATH:$(go env GOPATH)/bin"
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
_envoy_version=1.17.1
|
_envoy_version=1.17.1
|
||||||
_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../bin"
|
_dir="${DIR:-"$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../bin"}"
|
||||||
_target="${TARGET:-"$(go env GOOS)_$(go env GOARCH)"}"
|
_target="${TARGET:-"$(go env GOOS)-$(go env GOARCH)"}"
|
||||||
|
|
||||||
if [[ "${_target}" == darwin_* ]]; then
|
|
||||||
_envoy_platform="darwin"
|
|
||||||
elif [[ "${_target}" == linux_* ]]; then
|
|
||||||
_envoy_platform="linux_glibc"
|
|
||||||
else
|
|
||||||
echo "unsupported TARGET: ${_target}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
is_command() {
|
is_command() {
|
||||||
command -v "$1" >/dev/null
|
command -v "$1" >/dev/null
|
||||||
|
@ -42,13 +33,6 @@ hash_sha256() {
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p "$_dir"
|
mkdir -p "$_dir"
|
||||||
|
curl -L -o "$_dir/envoy" "https://github.com/pomerium/envoy-binaries/releases/download/v${_envoy_version}/envoy-${_target}"
|
||||||
if [ "$_target" == "linux_arm64" ]; then
|
|
||||||
mkdir -p "$_dir"
|
|
||||||
curl -L -o "$_dir/envoy" https://github.com/pomerium/envoy-binaries/releases/download/v${_envoy_version}/envoy-linux-arm64
|
|
||||||
else
|
|
||||||
env HOME="$_dir" getenvoy fetch standard:${_envoy_version}/${_envoy_platform}
|
|
||||||
cp -f "$_dir/.getenvoy/builds/standard/${_envoy_version}/${_envoy_platform}/bin/envoy" "$_dir/envoy"
|
|
||||||
fi
|
|
||||||
|
|
||||||
hash_sha256 "$_dir/envoy" >"$_dir/envoy.sha256"
|
hash_sha256 "$_dir/envoy" >"$_dir/envoy.sha256"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue