-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from xmtp/nmolnar/fix-github-install
Fix installation via GitHub
- Loading branch information
Showing
5 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ jobs: | |
- uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- uses: bufbuild/[email protected] | ||
- name: Setup buf build | ||
uses: bufbuild/[email protected] | ||
- run: npm ci | ||
- run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,7 @@ jobs: | |
- uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Setup buf build | ||
uses: bufbuild/[email protected] | ||
- run: npm ci | ||
- run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,7 @@ jobs: | |
- uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Setup buf build | ||
uses: bufbuild/[email protected] | ||
- run: npm ci | ||
- run: npm run test:${{ matrix.env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# Based loosely off of the script here https://docs.buf.build/ci-cd/setup | ||
# Fixed a bug in their script + added support for checking if buf is already installed | ||
|
||
set -eu | ||
|
||
if which buf &>/dev/null; then | ||
echo "Existing buf version found. No need to install" | ||
exit 0 | ||
fi | ||
|
||
|
||
# Use your desired buf version | ||
BUF_VERSION=1.0.0 | ||
# Putting this in a location likely to already be in the $PATH | ||
BIN_DIR="$npm_config_prefix/bin" | ||
|
||
URL="https://github.com/bufbuild/buf/releases/download/v$BUF_VERSION/buf-$(uname -s)-$(uname -m)" | ||
echo "Downloading buf from $URL" | ||
|
||
curl -sSL $URL -o "$BIN_DIR/buf" | ||
chmod +x "$BIN_DIR/buf" |