Skip to content

Commit

Permalink
chore: add sync task, update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
revoltez committed Mar 31, 2024
1 parent f66d876 commit 919f586
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,25 @@ test/e2e/minikube/run-test.sh teardown

## Development

After editing files in `proto/` or `contracts/`, make sure to run the following commands to sync the generated files:
Install Turbo (If you haven't already) using your favorite package manager , Ex: `npm i -g turbo`

```bash
forge build --root contracts
go generate
turbo build
#### Syncing Generated Files

After editing files in `proto/` or `contracts/`, run the following command to sync the generated files:

```sh
turbo sync
```

#### Build Images

The following will build the apocryph trusted pods server and the p2p-helper images

```sh
turbo build-images
```

<!-- Note that while committing generated files is foreign to Nodejs/NPM, it's the usual way of life in the Go ecosystem, as packages are directly cloned from git rather than downloaded from the package manager. Here we are committing both in order to not require forge/protoc for JavaScript development when it's optional for Go development. -->
<!-- Note that while committing generated files is foreign to Nodejs/NPM, it's the usual way of life in the Go ecosystem, as packages are directly cloned from git rather than downloaded from the package manager. Here we are committing both in order to not require forge/protoc for JavaScript development when it's optional for Go development. -->

## Contributing

Expand Down
13 changes: 8 additions & 5 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["//#build-images", "ts-gen-abi", "ts-gen-proto"]
"dependsOn": ["//#build-images"]
},
"//#lint": {},
"sync": {
"dependsOn": ["//#go-build", "ts-gen-proto", "ts-gen-abi"]
},
"//#go-build": {
"inputs": ["./proto/**"],
"dependsOn": ["//#build-contracts"]
},
"//#build-contracts": {
"inputs": ["./contracts/**"]
},
"//#build-tpodserver": {
"dependsOn": ["//#go-build"]
},
"//#build-p2p-helper": {
"dependsOn": ["//#go-build"]
},
"//#build-images": {
"dependsOn": ["//#build-tpodserver", "//#build-p2p-helper"]
},
"//#build-contracts": {
"inputs": ["./contracts/**"]
"dependsOn": ["//#sync", "//#build-tpodserver", "//#build-p2p-helper"]
},
"ts-gen-proto": {
"inputs": ["../../proto/**"]
Expand Down

0 comments on commit 919f586

Please sign in to comment.