Skip to content

Commit

Permalink
Merge pull request #298 from overmindtech/fix-build
Browse files Browse the repository at this point in the history
Temporary fix for updating sdp-go
  • Loading branch information
DavidS-ovm authored Dec 13, 2024
2 parents a0cd2eb + 7ddf8db commit f4867bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
set -x
# remove the symlinks
rm -f gen/sdp-go gen/sdp-js
rm -Rf gen/sdp-go gen/sdp-js
# replace them with full checkouts
git clone https://${GIT_USER}@github.com/overmindtech/sdp-go.git gen/sdp-go
git clone https://${GIT_USER}@github.com/overmindtech/sdp-js.git gen/sdp-js
git clone https://${GIT_USER}@github.com/overmindtech/sdp-go.git gen/sdp-go.git
git clone https://${GIT_USER}@github.com/overmindtech/sdp-js.git gen/sdp-js.git
# remove previously generated files
rm -Rf gen/sdp-go/*.pb.go gen/sdp-go/sdpconnect/*.connect.go
rm -Rf gen/sdp-js/src/__generated__/
rm -Rf gen/sdp-go.git/*.pb.go gen/sdp-go/sdpconnect/*.connect.go
rm -Rf gen/sdp-js.git/src/__generated__/
# generate the code
npx buf generate
Expand All @@ -60,8 +60,9 @@ jobs:
# add and commit the results
for i in sdp-go sdp-js; do
(
cd gen/$i
cd gen/$i.git
git pull
cp -av ../$i/* .
git add -A
git commit -m "Updated to SDP ${SDP_DESCRIBE}" || exit 0
Expand Down
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,4 @@ Sources that encountered errors will send errors on the `query.{uuid}` subject o

## Building

Install the Go dependencies:

```shell
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
```

Install the Node dependencies:

```shell
npm i
```

Run `buf` through `npx` to generate the stubs:

```shell
npx buf generate
```

> Note: depending on your use case, symlink or checkout the `sdp-js` and `sdp-go` repositories into the `gen/` directory. See `sdp/.github/workflows/update.yml` for details.
See `sdp/.github/workflows/update.yml` for details. Previously this was easily done locally, but recent changes to buf broke the symlink method.

0 comments on commit f4867bd

Please sign in to comment.