diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7b510349d..04fe909d53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,9 +63,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - name: cargo check run: cargo check diff --git a/.github/workflows/customer-docker.yml b/.github/workflows/customer-docker.yml index 51a5e4cf1c..8bb969cd40 100644 --- a/.github/workflows/customer-docker.yml +++ b/.github/workflows/customer-docker.yml @@ -27,9 +27,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - uses: depot/setup-action@v1 diff --git a/.github/workflows/dev-docker.yml b/.github/workflows/dev-docker.yml index 2d44d0ec1e..613af83b14 100644 --- a/.github/workflows/dev-docker.yml +++ b/.github/workflows/dev-docker.yml @@ -26,9 +26,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - uses: depot/setup-action@v1 diff --git a/.github/workflows/flow.yml b/.github/workflows/flow.yml index d646b3cda0..f9a5714802 100644 --- a/.github/workflows/flow.yml +++ b/.github/workflows/flow.yml @@ -36,9 +36,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - uses: actions/setup-go@v5 with: diff --git a/.github/workflows/golang-lint.yml b/.github/workflows/golang-lint.yml index 8ab87e0395..d5e4296787 100644 --- a/.github/workflows/golang-lint.yml +++ b/.github/workflows/golang-lint.yml @@ -17,9 +17,7 @@ jobs: - uses: bufbuild/buf-setup-action@v1.28.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - name: install lib-geos run: | sudo apt-get update diff --git a/.github/workflows/rust-lint.yml b/.github/workflows/rust-lint.yml index 8686669026..40934f6247 100644 --- a/.github/workflows/rust-lint.yml +++ b/.github/workflows/rust-lint.yml @@ -25,9 +25,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/stable-docker.yml b/.github/workflows/stable-docker.yml index 5e81abf3fb..8e62a7685b 100644 --- a/.github/workflows/stable-docker.yml +++ b/.github/workflows/stable-docker.yml @@ -24,9 +24,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - uses: depot/setup-action@v1 diff --git a/.github/workflows/ui-build.yml b/.github/workflows/ui-build.yml index 53202781d7..9d9d387926 100644 --- a/.github/workflows/ui-build.yml +++ b/.github/workflows/ui-build.yml @@ -22,9 +22,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - name: Install Node.js dependencies working-directory: ui diff --git a/.github/workflows/ui-lint.yml b/.github/workflows/ui-lint.yml index 11ef0c0eca..960942c85f 100644 --- a/.github/workflows/ui-lint.yml +++ b/.github/workflows/ui-lint.yml @@ -26,9 +26,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: setup protos - run: | - ./generate_protos.sh + - run: buf generate protos - name: Install Node.js dependencies working-directory: ui diff --git a/generate_protos.sh b/generate_protos.sh index 4124962c24..8ad26ea94a 100755 --- a/generate_protos.sh +++ b/generate_protos.sh @@ -1,5 +1,5 @@ -#!/bin/bash -set -xeuo pipefail +#!/bin/sh +set -xeu # check if buf is installed if ! command -v buf &> /dev/null @@ -9,4 +9,4 @@ then exit fi -buf generate protos +exec buf generate protos diff --git a/run-peerdb.sh b/run-peerdb.sh index 74b1dfda71..20eb6dcf07 100755 --- a/run-peerdb.sh +++ b/run-peerdb.sh @@ -1,5 +1,5 @@ -#!/bin/bash -set -Eeuo pipefail +#!/bin/sh +set -Eeu if ! command -v docker &> /dev/null then diff --git a/scripts/install-protobuf.sh b/scripts/install-protobuf.sh index a825016c58..ad3c67c811 100755 --- a/scripts/install-protobuf.sh +++ b/scripts/install-protobuf.sh @@ -1,5 +1,5 @@ -#!/bin/bash -set -Eeuo pipefail +#!/bin/sh +set -Eeu # install the protobuf compiler PROTOBUF_MAJOR_VERSION=3 @@ -21,12 +21,12 @@ PROTOBUF_ARCHIVE="protoc-$PROTOBUF_MINOR_VERSION-linux-$ARCH.zip" PROTOBUF_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_MINOR_VERSION/$PROTOBUF_ARCHIVE" mkdir -p /tmp/protoc-install -pushd /tmp/protoc-install -curl -L "$PROTOBUF_URL" -O -unzip "$PROTOBUF_ARCHIVE" -d protoc3 +( + cd /tmp/protoc-install + curl -L "$PROTOBUF_URL" -O + unzip "$PROTOBUF_ARCHIVE" -d protoc3 -mv protoc3/bin/* /usr/local/bin/ -mv protoc3/include/* /usr/local/include/ - -popd + mv protoc3/bin/* /usr/local/bin/ + mv protoc3/include/* /usr/local/include/ +)