SummerCart64/docker_build.sh

19 lines
474 B
Bash
Raw Permalink Normal View History

#!/bin/bash
2021-11-25 23:11:36 +01:00
GIT_SHA=$(git rev-parse --short HEAD)
GIT_TAG=$(git describe --tags --exact-match 2> /dev/null)
2021-11-30 00:47:35 +01:00
if [ ! -z $GIT_TAG ]; then
__SC64_VERSION=$(printf "%.7q\ %.7q" $GIT_SHA $GIT_TAG)
2021-11-25 23:11:36 +01:00
else
2021-11-30 00:47:35 +01:00
__SC64_VERSION=$(printf "%.7q\ develop" $GIT_SHA)
2021-11-25 23:11:36 +01:00
fi
docker run \
2021-11-19 00:18:46 +01:00
--rm \
2021-11-18 02:51:43 +01:00
--user $(id -u):$(id -g) \
--mount type=bind,src="$(pwd)",target="/workdir" \
2021-11-25 23:11:36 +01:00
-e __SC64_VERSION="$__SC64_VERSION" \
ghcr.io/polprzewodnikowy/sc64env:v1.2 \
./build.sh $@