Skip to content

Commit

Permalink
replace bash with sh (#1324)
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Feb 17, 2024
1 parent a1cd11f commit 64bf0ed
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 41 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/customer-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/dev-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/golang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
- uses: bufbuild/[email protected]
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
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/stable-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ui-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ui-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions generate_protos.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xeuo pipefail
#!/bin/sh
set -xeu

# check if buf is installed
if ! command -v buf &> /dev/null
Expand All @@ -9,4 +9,4 @@ then
exit
fi

buf generate protos
exec buf generate protos
4 changes: 2 additions & 2 deletions run-peerdb.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -Eeuo pipefail
#!/bin/sh
set -Eeu

if ! command -v docker &> /dev/null
then
Expand Down
18 changes: 9 additions & 9 deletions scripts/install-protobuf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -Eeuo pipefail
#!/bin/sh
set -Eeu

# install the protobuf compiler
PROTOBUF_MAJOR_VERSION=3
Expand All @@ -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/
)

0 comments on commit 64bf0ed

Please sign in to comment.