-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 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 |
---|---|---|
@@ -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 |