SummerCart64/docker_build.sh
Polprzewodnikowy 733cc17ba7 more cleanup
2022-01-12 16:14:08 +01:00

20 lines
488 B
Bash
Executable File

#!/bin/bash
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
GIT_SHA=$(git rev-parse HEAD)
GIT_TAG=$(git describe --tags --exact-match 2> /dev/null)
if [ -z $GIT_TAG ]; then
GIT_TAG="develop"
fi
__SC64_VERSION=$(printf "[ %q | %q | %q ]" $GIT_BRANCH $GIT_TAG $GIT_SHA)
docker run \
--rm \
--user $(id -u):$(id -g) \
--mount type=bind,src="$(pwd)",target="/workdir" \
-e __SC64_VERSION="$__SC64_VERSION" \
ghcr.io/polprzewodnikowy/sc64env:v1.2 \
./build.sh $@