CI: Set GOPATH in install-cli-tools.sh

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2022-07-23 15:02:28 +02:00
parent 4ab35c4dc7
commit dcd3c5d8a9

View file

@ -11,6 +11,12 @@ if [[ $(id -u) != "0" ]]; then
exit 1
fi
if ! command -v go &> /dev/null
then
echo "Go must be installed."
exit 1
fi
if [[ $PHOTOPRISM_ARCH ]]; then
SYSTEM_ARCH=$PHOTOPRISM_ARCH
else
@ -18,12 +24,13 @@ else
fi
DESTARCH=${2:-$SYSTEM_ARCH}
GOPATH=$(go env GOPATH)
echo "Installing Go Tools for ${DESTARCH^^}..."
set -e
mkdir -p "$GOPATH/src" "$GOBIN"
mkdir -p "$GOPATH/src"
# Install gosu in "/usr/local/sbin".
echo "Installing gosu in /usr/local/sbin..."