@@ -12,7 +12,7 @@ if [ "$OS_NAME" == "linux" ]; then
12
12
# Which docker image to use to run the CI. Defaults to Docker Hub.
13
13
# Overwrite with CI_IMAGE=docker/image/path environment variable.
14
14
# Keep this in sync with .github/workflows/ci.yml.
15
- : " ${CI_IMAGE:= shiftcrypto/ bitbox-wallet-app: 26 } "
15
+ : " ${CI_IMAGE:= shiftcrypto/ bitbox-wallet-app: $(cat .containerversion) } "
16
16
# Time image pull to compare in the future.
17
17
time docker pull " $CI_IMAGE "
18
18
@@ -22,24 +22,18 @@ if [ "$OS_NAME" == "linux" ]; then
22
22
# CI (https://github.com/actions/checkout/issues/760)
23
23
docker run --privileged \
24
24
-v $HOME /.gradle:/root/.gradle \
25
- -v ${GITHUB_BUILD_DIR} :/opt /go/${GO_SRC_DIR} / \
25
+ -v ${GITHUB_BUILD_DIR} :/root /go/${GO_SRC_DIR} / \
26
26
-i " ${CI_IMAGE} " \
27
- bash -c " git config --global --add safe.directory \$ GOPATH/${GO_SRC_DIR} && make -C \$ GOPATH/${GO_SRC_DIR} ${WHAT} "
27
+ bash -c " git config --global --add safe.directory \$ (go env GOPATH) /${GO_SRC_DIR} && make -C \$ (go env GOPATH) /${GO_SRC_DIR} ${WHAT} "
28
28
fi
29
29
30
30
# The following is executed only on macOS machines.
31
31
if [ " $OS_NAME " == " osx" ]; then
32
32
# GitHub CI installs Go and Qt directly in the macos action, before executing
33
33
# this script.
34
34
go version
35
- export GOPATH=~ /go
36
- export PATH=" $PATH :~/go/bin"
37
- mkdir -p $GOPATH /$( dirname $GO_SRC_DIR )
38
- # GitHub checkout action (git clone) seem to require current work dir
39
- # to be the root of the repo during its clean up phase. So, we push it
40
- # here and pop in the end.
41
- pushd ../ && cp -a bitbox-wallet-app $GOPATH /$( dirname $GO_SRC_DIR )
42
- cd $GOPATH /$GO_SRC_DIR
43
- make " $WHAT "
44
- popd
35
+ export PATH=" ~/go/bin:$PATH "
36
+ mkdir -p $( go env GOPATH) /$( dirname $GO_SRC_DIR )
37
+ cp -a ../bitbox-wallet-app $( go env GOPATH) /$( dirname $GO_SRC_DIR )
38
+ make -C $( go env GOPATH) /$GO_SRC_DIR " $WHAT "
45
39
fi
0 commit comments