1
0
Fork 0
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:
Simon Frei 2019-09-05 17:25:15 +02:00
parent 345452a38c
commit b2df80cf27
No known key found for this signature in database
GPG key ID: 7C31D23ECB1006F3
3 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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',
}) })