Add/update scripts for go tools
parent
914006283e
commit
9606935ba1
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||
|
||||
VERSION=${VERSION:-2.10.3}
|
||||
DEST="${XDG_DATA_HOME}/apps/releases/protoc-grpc-gateway"
|
||||
BASE_URL=https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${VERSION}
|
||||
GRPC_GATEWAY_URL=${BASE_URL}/protoc-gen-grpc-gateway-v${VERSION}-$(get_os)-$(uname -m)
|
||||
OPENAPI_V2_URL=${BASE_URL}/protoc-gen-openapiv2-v${VERSION}-$(get_os)-$(uname -m)
|
||||
|
||||
extract_binary "${GRPC_GATEWAY_URL}" "${DEST}/${VERSION}/protoc-gen-grpc-gateway"
|
||||
extract_binary "${OPENAPI_V2_URL}" "${DEST}/${VERSION}/protoc-gen-openapiv2"
|
||||
|
||||
set_current_link "${DEST}" "${VERSION}"
|
||||
|
||||
set_link "${XDG_BIN_HOME}/protoc-gen-grpc-gateway" "${DEST}" protoc-gen-grpc-gateway
|
||||
set_link "${XDG_BIN_HOME}/protoc-gen-openapiv2" "${DEST}" protoc-gen-openapiv2
|
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||
|
||||
function get_os () (
|
||||
case $(uname -s) in
|
||||
Linux*) echo linux;;
|
||||
Darwin*) echo darwin;;
|
||||
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
|
||||
esac
|
||||
)
|
||||
|
||||
function get_arch () (
|
||||
case $(uname -m) in
|
||||
x86_64) echo x64;;
|
||||
arm64) echo arm64;;
|
||||
aarch64) echo arm64;;
|
||||
*) >&2 echo "unsupported arch: $(uname -m)"; exit 1;;
|
||||
esac
|
||||
)
|
||||
|
||||
APP=pulumi
|
||||
VERSION=${VERSION:-3.35.2}
|
||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||
URL=https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-$(get_os)-$(get_arch).tar.gz
|
||||
|
||||
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1"
|
||||
set_current_link "${DEST}" "${VERSION}"
|
||||
|
||||
for PULUMI_APP in $(find "${DEST}/${VERSION}" -type f -exec basename "{}" \; | sort); do
|
||||
set_link "${XDG_BIN_HOME}/${PULUMI_APP}" "${DEST}" "${PULUMI_APP}"
|
||||
done
|
Loading…
Reference in New Issue