2021-12-01 21:35:47 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Set the TAG environment variable to build a specific tag
|
2021-12-03 09:53:15 +01:00
|
|
|
# Set the REPO environment variable to point at a different git repository
|
2021-12-01 21:35:47 +01:00
|
|
|
|
2021-12-03 09:53:15 +01:00
|
|
|
# Make sure we're in the same directory as this script
|
2021-12-01 21:35:47 +01:00
|
|
|
pushd $(dirname "$(realpath "$0")")
|
|
|
|
|
2021-12-03 09:53:15 +01:00
|
|
|
BUILDARG=""
|
|
|
|
SUFFIX=""
|
|
|
|
[ -n "${TAG}" ] && BUILDARG="${BUILDARG} --build-arg=TAG=${TAG}" && SUFFIX=":${TAG}"
|
|
|
|
[ -n "${REPO}" ] && BUILDARG="${BUILDARG} --build-arg=REPO=${REPO}"
|
|
|
|
|
|
|
|
docker build ${BUILDARG} -t imhex-appimage-build${SUFFIX} .
|
2021-12-01 21:35:47 +01:00
|
|
|
|
|
|
|
popd
|