Skip to content

Commit 22c72ac

Browse files
authored
Merge pull request #161 from lightninglabs/lit-0.3.3
Prepare for LiT v0.3.3-alpha
2 parents 3d93358 + 5afccea commit 22c72ac

File tree

6 files changed

+33
-13
lines changed

6 files changed

+33
-13
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: docker/build-push-action@v2
3939
with:
4040
push: true
41-
platforms: linux/amd64,linux/arm/v7,linux/arm64
41+
platforms: linux/amd64,linux/arm64
4242
tags: "${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.RELEASE_VERSION }}"
4343
build-args: checkout=${{ env.RELEASE_VERSION }}
4444

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Lightning Terminal is backwards compatible with `lnd` back to version v0.11.1-be
6666

6767
| LiT | LND |
6868
| ---------------- | ------------ |
69+
| **v0.3.3-alpha** | v0.11.1-beta |
6970
| **v0.3.2-alpha** | v0.11.1-beta |
7071
| **v0.3.1-alpha** | v0.11.1-beta |
7172
| **v0.3.0-alpha** | v0.11.1-beta |
@@ -75,6 +76,7 @@ Lightning Terminal is backwards compatible with `lnd` back to version v0.11.1-be
7576

7677
| LiT | LND | Loop | Faraday | Pool |
7778
| ---------------- | ------------ | ----------- | ------------ |---------------|
79+
| **v0.3.3-alpha** | v0.11.1-beta | v0.11.2-beta | v0.2.2-alpha | v0.3.4-alpha |
7880
| **v0.3.2-alpha** | v0.11.1-beta | v0.11.1-beta | v0.2.2-alpha | v0.3.4-alpha |
7981
| **v0.3.1-alpha** | v0.11.1-beta | v0.11.1-beta | v0.2.2-alpha | v0.3.3-alpha |
8082
| **v0.3.0-alpha** | v0.11.1-beta | v0.11.0-beta | v0.2.2-alpha | v0.3.2-alpha |

app/scripts/build-protos.js

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,34 @@ const { join, sep } = require('path');
77
const { platform } = require('os');
88
const appPath = join(__dirname, '..');
99

10-
/** Specify the versions of LND and Loop protos to download */
11-
const LND_VERSION = 'v0.11.1-beta';
12-
const LOOP_VERSION = 'v0.11.2-beta';
10+
/**
11+
* Specify the pattern under which the project's version can be found in the
12+
* root directory's go.mod file.
13+
*/
14+
const LND_VERSION_PATTERN = /^\tgithub\.com\/lightningnetwork\/lnd (v[\d.]+-beta)/ms;
15+
const LOOP_VERSION_PATTERN = /^\tgithub\.com\/lightninglabs\/loop (v[\d.]+-beta)/ms;
1316

1417
/** mapping of proto files to the github url to download each from */
15-
const protoSources = {
16-
lnd: `lightningnetwork/lnd/${LND_VERSION}/lnrpc/rpc.proto`,
17-
loop: `lightninglabs/loop/${LOOP_VERSION}/looprpc/client.proto`,
18+
const protoSources = async () => {
19+
console.log('Parsing go.mod for versions...');
20+
const goModPath = join(appPath, '..', 'go.mod');
21+
const goModSource = (await fs.readFile(goModPath)).toString();
22+
23+
const lndVersion = goModSource.match(LND_VERSION_PATTERN);
24+
if (!lndVersion || lndVersion.length !== 2) {
25+
throw new Error(`go.mod did not match pattern ${LND_VERSION_PATTERN}`);
26+
}
27+
28+
const loopVersion = goModSource.match(LOOP_VERSION_PATTERN);
29+
if (!loopVersion || loopVersion.length !== 2) {
30+
throw new Error(`go.mod did not match pattern ${LOOP_VERSION_PATTERN}`);
31+
}
32+
33+
console.log(`Found lnd version ${lndVersion[1]} and loop version ${loopVersion[1]}.`);
34+
return {
35+
lnd: `lightningnetwork/lnd/${lndVersion[1]}/lnrpc/rpc.proto`,
36+
loop: `lightninglabs/loop/${loopVersion[1]}/looprpc/client.proto`,
37+
};
1838
};
1939

2040
/** list of proto files and patches to apply */
@@ -30,7 +50,7 @@ const filePatches = {
3050
*/
3151
const download = async () => {
3252
console.log('\nDownloading proto files...');
33-
for ([name, urlPath] of Object.entries(protoSources)) {
53+
for ([name, urlPath] of Object.entries(await protoSources())) {
3454
const url = `https://raw.githubusercontent.com/${urlPath}`;
3555
const filePath = join(appPath, '..', 'proto', `${name}.proto`);
3656
console.log(`${url}`);

doc/compile.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ To compile the proto files into JS/TS code, follow the following steps:
8383
work properly.
8484

8585
> Note: if you are running on a Mac, you only need to perform step 1
86-
1. Update the version of `lnd` and/or `loop` at the top of the [build-protos.js](../src/scripts/build-protos.js)
87-
file.
8886
1. Run the following command to download the proto files from each repo and compile the
8987
JS/TS code using the updated protos.
9088
```shell script

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/lightninglabs/aperture v0.1.3-beta
1111
github.com/lightninglabs/faraday v0.2.2-alpha
1212
github.com/lightninglabs/lndclient v0.11.0-3
13-
github.com/lightninglabs/loop v0.11.1-beta
13+
github.com/lightninglabs/loop v0.11.2-beta
1414
github.com/lightninglabs/pool v0.3.4-alpha
1515
github.com/lightningnetwork/lnd v0.11.1-beta
1616
github.com/lightningnetwork/lnd/cert v1.0.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ github.com/lightninglabs/lndclient v0.11.0-0/go.mod h1:8/cTKNwgL87NX123gmlv3Xh6p
230230
github.com/lightninglabs/lndclient v0.11.0-3 h1:x8co3UOeaUwh0iBFNeaPaqJsg8gvlgV/+fQHp2MT9eI=
231231
github.com/lightninglabs/lndclient v0.11.0-3/go.mod h1:8/cTKNwgL87NX123gmlv3Xh6p1a7pvzu+40Un3PhHiI=
232232
github.com/lightninglabs/lndclient v0.11.0-3/go.mod h1:8/cTKNwgL87NX123gmlv3Xh6p1a7pvzu+40Un3PhHiI=
233-
github.com/lightninglabs/loop v0.11.1-beta h1:FN2MJBn3MIFLxjdyOCqyVSSopFMHQDX5HtqNBdx4svE=
234-
github.com/lightninglabs/loop v0.11.1-beta/go.mod h1:xZfGG0AbxwAoarGGLeEl8TEzGm/Wz81L8IN51iqWn3M=
233+
github.com/lightninglabs/loop v0.11.2-beta h1:duhmf2G/yQbLnAc0vYvzxkm86gDTRswlvtstmO6MAZA=
234+
github.com/lightninglabs/loop v0.11.2-beta/go.mod h1:xZfGG0AbxwAoarGGLeEl8TEzGm/Wz81L8IN51iqWn3M=
235235
github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg=
236236
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200 h1:j4iZ1XlUAPQmW6oSzMcJGILYsRHNs+4O3Gk+2Ms5Dww=
237237
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200/go.mod h1:MlZmoKa7CJP3eR1s5yB7Rm5aSyadpKkxqAwLQmog7N0=

0 commit comments

Comments
 (0)