mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +00:00
also persist go pkgs on docker image
This commit is contained in:
parent
345452a38c
commit
b2df80cf27
3 changed files with 4 additions and 2 deletions
|
@ -37,6 +37,9 @@ ENV SYNCTHING_ANDROID_PREBUILT 1
|
||||||
# Set location of go cache
|
# Set location of go cache
|
||||||
ENV GOCACHE /opt/gocache
|
ENV GOCACHE /opt/gocache
|
||||||
|
|
||||||
|
# Set location of GOPATH to persist packages for module builds in GOPATH/pkg/mod
|
||||||
|
ENV GOPATH /opt/gopath
|
||||||
|
|
||||||
# Run prebuild script (will prebuild stuff into the image if env var is set)
|
# Run prebuild script (will prebuild stuff into the image if env var is set)
|
||||||
ADD prebuild.sh /opt/prebuild.sh
|
ADD prebuild.sh /opt/prebuild.sh
|
||||||
RUN /opt/prebuild.sh
|
RUN /opt/prebuild.sh
|
||||||
|
|
|
@ -33,7 +33,7 @@ for ARCH in arm x86 arm64; do
|
||||||
GOOS=android GOARCH=$GOARCH go install -v std
|
GOOS=android GOARCH=$GOARCH go install -v std
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Prepopulating gradle cache"
|
echo "Prepopulating gradle and go build/pkg cache"
|
||||||
git clone https://github.com/syncthing/syncthing-android
|
git clone https://github.com/syncthing/syncthing-android
|
||||||
cd syncthing-android
|
cd syncthing-android
|
||||||
./gradlew --no-daemon lint
|
./gradlew --no-daemon lint
|
||||||
|
|
|
@ -109,7 +109,6 @@ for target in BUILD_TARGETS:
|
||||||
|
|
||||||
environ = os.environ.copy()
|
environ = os.environ.copy()
|
||||||
environ.update({
|
environ.update({
|
||||||
'GOPATH': module_dir,
|
|
||||||
'GO111MODULE': 'on',
|
'GO111MODULE': 'on',
|
||||||
'CGO_ENABLED': '1',
|
'CGO_ENABLED': '1',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue