You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
760 B
Bash

#!/bin/bash
# Install protoc
if [[ ! -x /go/bin/protoc-gen-micro ]]; then
cd /tmp
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install github.com/go-micro/generator/cmd/protoc-gen-micro@v1.0.0
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
fi
# Install task
if [[ ! -x /go/bin/task ]]; then
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /go/bin
fi
# Install trunk
if [[ ! -x /go/bin/trunk ]]; then
pushd /go/bin
curl -LO https://trunk.io/releases/trunk
chmod +x trunk
popd
fi
# Protos
if [[ ! -d /go/protos/googleapis ]]; then
mkdir -p /go/protos
pushd /go/protos
git clone --depth 1 https://github.com/googleapis/googleapis.git
popd
fi
exec "$@"