Commit 26b759cf authored by Kris Hicks's avatar Kris Hicks
Browse files

Add buf to CircleCI

parent 99d0dcbe
Branches unavailable
No related merge requests found
Showing with 43 additions and 0 deletions
+43 -0
......@@ -743,6 +743,10 @@ jobs:
sudo rm -rf /usr/bin/protoc
sudo ./scripts/vagrant-linux-priv-protoc.sh
name: install protoc
- run:
command: |
sudo ./scripts/vagrant-linux-priv-protoc.sh
name: install buf
- run:
command: "CCI_VERSION=\"0.1.5879\"\nCCI_SHA256=\"f178ea62c781aec06267017404f87983c87f171fd0e66ef3737916246ae66dd6\"\n\nURL=\"https://github.com/CircleCI-Public/circleci-cli/releases/download/v${CCI_VERSION}/circleci-cli_${CCI_VERSION}_linux_amd64.tar.gz\"\n\nmkdir -p /tmp/circleci-cli/\ncurl --fail --show-error --location \\\n -o /tmp/circleci-cli/cli.tar.gz \"${URL}\"\n\necho \"$CCI_SHA256 /tmp/circleci-cli/cli.tar.gz\" | sha256sum -c\n\ntar -xz --strip-components=1 \\\n -C /tmp/circleci-cli \\\n -f /tmp/circleci-cli/cli.tar.gz \\\n \"circleci-cli_${CCI_VERSION}_linux_amd64/circleci\" \n\nsudo cp /tmp/circleci-cli/circleci /usr/bin/circleci-local-cli\n\ncircleci-local-cli version\n"
name: Install CircleCI CLI 0.1.5879
......
steps:
- run:
name: install buf
command: |
sudo ./scripts/vagrant-linux-priv-protoc.sh
......@@ -3,6 +3,7 @@ steps:
- checkout
- run: apt-get update; apt-get install -y shellcheck sudo unzip
- install-protoc
- install-buf
- install-circleci-local-cli
- run: make deps lint-deps
- run: make check
......
#!/usr/bin/env bash
set -o errexit
# Make sure you grab the latest version
VERSION=0.30.0
DOWNLOAD=https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-Linux-x86_64.tar.gz
function install() {
if [[ -e /usr/local/bin/buf ]] ; then
if [ "${VERSION}" = "$(buf --version)" ] ; then
return
fi
fi
# Download
curl -sSL --fail "$DOWNLOAD" | tar -C /tmp -xvzf - buf/bin
# all buf files should be world-wide readable
chmod -R a+r /tmp/buf/bin/*
# Move buf binaries to /usr/local/bin/
mv /tmp/buf/bin/* /usr/local/bin/
# Link
ln -s /usr/local/bin/buf /usr/bin/buf
ln -s /usr/local/bin/protoc-gen-buf-check-breaking /usr/bin/protoc-gen-buf-check-breaking
ln -s /usr/local/bin/protoc-gen-buf-check-lint /usr/bin/protoc-gen-buf-check-lint
rm -rf /tmp/buf
}
install
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment