Skip to content

Commit

Permalink
new file DEVELOPING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Aug 7, 2023
1 parent dcdaa53 commit e88accf
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Developing

## Introduce changes in dvote-protobuf

```sh
git clone git@github.com:vocdoni/dvote-protobuf.git && cd dvote-protobuf
git checkout -b feat-add-DummyMessage # don't use slashes (/)
cat >> src/vochain/vochain.proto << EOF
message DummyMessage {
bytes payload = 1;
}
EOF
git commit . -m "add DummyMessage"
git push --set-upstream origin feat-add-DummyMessage
```

if you use slashes in the branch name (say, `example/branch-name`), you won't be able to `go get go.vocdoni.io/proto@example/branch-name` in the next step due to a [go issue]:https://github.com/golang/go/issues/32955

## Stage them in a PR of dvote-protobuf

Now create a PR:

https://github.com/vocdoni/dvote-protobuf/pull/new/feat-add-DummyMessage

and wait a minute for the CI to run and auto commit the build changes
("auto build commit" is pushed to the PR automatically)

## Use that "staged" dvote-protobuf in vocdoni-node

```sh
git clone git@github.com:vocdoni/vocdoni-node.git && cd vocdoni-node
git checkout -b wonderful-feature # here it doesn't matter if you use slashes (/)
go get go.vocdoni.io/proto@feat-add-DummyMessage # this will pull the code from your PR
go mod tidy
git add go.mod go.sum
git commit -m "bump go.vocdoni.io/proto@feat-add-DummyMessage"
git push --set-upstream origin wonderful-feature
```

Now if you create a PR in vocdoni-node with your `wonderful-feature` branch, you'll see the CI of vocdoni-node pulls the dvote-protobuf from feat-add-DummyMessage

0 comments on commit e88accf

Please sign in to comment.