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