File tree Expand file tree Collapse file tree 6 files changed +38
-45
lines changed Expand file tree Collapse file tree 6 files changed +38
-45
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,6 @@ jobs:
147
147
lnd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }}
148
148
lnd-${{ runner.os }}-download-
149
149
150
- - name : install protoc and protobuf libraries
151
- run : ./scripts/install_protoc.sh
152
-
153
150
- name : get yarn cache dir
154
151
id : yarn-cache-dir
155
152
run : echo "::set-output name=dir::$(yarn cache dir)"
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ list:
193
193
194
194
protos :
195
195
@$(call print, "Compiling protos.")
196
- cd ./app ; yarn protos
196
+ cd proto ; ./gen_protos_docker.sh
197
197
198
198
protos-check : protos
199
199
@$(call print, "Verifying compiled protos.")
Original file line number Diff line number Diff line change @@ -76,18 +76,13 @@ Terminal are updated.
76
76
77
77
To compile the proto files into JS/TS code, follow the following steps:
78
78
79
- 1 . Install ` protoc ` ** v3.4.0** if you do not already have it installed. Follow the
80
- instructions in
81
- [ this guide] ( https://github.com/lightningnetwork/lnd/tree/master/lnrpc#generate-protobuf-definitions ) .
82
- Be sure to install the specific ** v3.4.0** version of ` protoc ` . Newer versions will not
83
- work properly.
84
-
85
- > Note: if you are running on a Mac, you only need to perform step 1
86
- 1 . Run the following command to download the proto files from each repo and compile the
87
- JS/TS code using the updated protos.
88
- ``` shell script
89
- $ cd app
90
- $ yarn protos
79
+ 1 . Install ` docker ` if you do not already have it installed. Follow the
80
+ instructions in [ this guide] ( https://docs.docker.com/get-docker/ ) .
81
+
82
+ 1 . Run the following command to download the proto files from each repo and
83
+ compile the JS/TS code using the updated protos.
84
+ ``` shell
85
+ $ make protos
91
86
```
92
87
1 . Fix any typing, linting, or unit test failures introduced by the update. Run the
93
88
commands below to find and fix these errors in the app code.
Original file line number Diff line number Diff line change
1
+ # Start with a NodeJS base image that also contains yarn.
2
+ FROM node:12.17.0-buster as nodejsbuilder
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ protobuf-compiler='3.6*' \
7
+ clang-format='1:7.0*'
8
+
9
+ RUN mkdir /build
10
+
11
+ WORKDIR /build
12
+
13
+ CMD ["/bin/bash" , "-c" , "cd app && yarn install && yarn protos" ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Directory of the script file, independent of where it's called from.
6
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
7
+
8
+ echo " Building protobuf compiler docker image..."
9
+ docker build -q -t lit-protobuf-builder .
10
+
11
+ echo " Compiling and formatting *.proto files..."
12
+ docker run \
13
+ --rm \
14
+ --user $UID :$UID \
15
+ -e UID=$UID \
16
+ -v " $DIR /../:/build" \
17
+ lit-protobuf-builder
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments