File tree Expand file tree Collapse file tree 4 files changed +55
-2
lines changed Expand file tree Collapse file tree 4 files changed +55
-2
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,22 @@ app-build: yarn-install
159
159
@$(call print, "Building production app.")
160
160
cd app; yarn build
161
161
162
- release : app-build
162
+ release : app-build go-release
163
+
164
+ go-release :
163
165
@$(call print, "Creating release of lightning-terminal.")
164
166
./release.sh build-release " $( VERSION_TAG) " " $( BUILD_SYSTEM) " " $( LND_RELEASE_TAGS) " " $( RELEASE_LDFLAGS) "
165
167
168
+ docker-release : app-build
169
+ @$(call print, "Building release helper docker image.")
170
+ if [ " $( tag) " = " " ]; then echo " Must specify tag=<commit_or_tag>!" ; exit 1; fi
171
+
172
+ docker build -t litd-release-helper -f make/builder.Dockerfile make/
173
+
174
+ # Run the actual compilation inside the docker image. We pass in all flags
175
+ # that we might want to overwrite in manual tests.
176
+ $(DOCKER_RELEASE_HELPER) make go-release tag="$(tag)" sys="$(sys)" COMMIT="$(COMMIT)"
177
+
166
178
docker-tools :
167
179
@$(call print, "Building tools docker image.")
168
180
docker build -q -t litd-tools $(TOOLS_DIR )
Original file line number Diff line number Diff line change
1
+ FROM golang:1.22.6-bookworm
2
+
3
+ MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering>
4
+
5
+ # Golang build related environment variables that are static and used for all
6
+ # architectures/OSes.
7
+ ENV GODEBUG netdns=cgo
8
+ ENV GO111MODULE=auto
9
+ ENV CGO_ENABLED=0
10
+
11
+ # Set up cache directories. Those will be mounted from the host system to speed
12
+ # up builds. If go isn't installed on the host system, those will fall back to
13
+ # temp directories during the build (see make/release_flags.mk).
14
+ ENV GOCACHE=/tmp/build/.cache
15
+ ENV GOMODCACHE=/tmp/build/.modcache
16
+
17
+ RUN apt-get update && apt-get install -y \
18
+ git \
19
+ make \
20
+ tar \
21
+ zip \
22
+ bash \
23
+ && mkdir -p /tmp/build/litd \
24
+ && mkdir -p /tmp/build/.cache \
25
+ && mkdir -p /tmp/build/.modcache \
26
+ && chmod -R 777 /tmp/build/
27
+
28
+ WORKDIR /tmp/build/litd
Original file line number Diff line number Diff line change 2
2
VERSION_TAG = $(shell git describe --abbrev=40 --broken --tags --always)
3
3
VERSION_CHECK = @$(call print, "Building master with date version tag")
4
4
5
+ DOCKER_RELEASE_HELPER = docker run \
6
+ -it \
7
+ --rm \
8
+ --user $(shell id -u) :$(shell id -g) \
9
+ -v $(shell pwd) :/tmp/build/litd \
10
+ -v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache) "):/tmp/build/.cache \
11
+ -v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache) "):/tmp/build/.modcache \
12
+ -e SKIP_VERSION_CHECK \
13
+ litd-release-helper
14
+
5
15
BUILD_SYSTEM = darwin-amd64 \
6
16
darwin-arm64 \
7
17
linux-386 \
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Simple bash script to build basic lnd tools for all the platforms
3
+ # Simple bash script to build basic litd tools for all the platforms
4
4
# we support with the golang cross-compiler.
5
5
#
6
6
# Copyright (c) 2016 Company 0, LLC.
@@ -114,6 +114,9 @@ function build_release() {
114
114
reproducible_tar_gzip ${package_source}
115
115
mv " ${package_source} .tar.gz" " ${package_source} -$tag .tar.gz"
116
116
117
+ echo " Current git status before starting build: "
118
+ git status
119
+
117
120
for i in $sys ; do
118
121
os=$( echo $i | cut -f1 -d-)
119
122
arch=$( echo $i | cut -f2 -d-)
You can’t perform that action at this time.
0 commit comments