2021-09-26 14:42:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-01-12 16:14:08 +01:00
|
|
|
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
GIT_SHA=$(git rev-parse HEAD)
|
2021-12-10 17:36:30 +01:00
|
|
|
GIT_TAG=$(git describe --tags --exact-match 2> /dev/null)
|
|
|
|
|
2022-01-12 16:14:08 +01:00
|
|
|
if [ -z $GIT_TAG ]; then
|
|
|
|
GIT_TAG="develop"
|
2021-12-10 17:36:30 +01:00
|
|
|
fi
|
|
|
|
|
2022-01-12 16:14:08 +01:00
|
|
|
__SC64_VERSION=$(printf "[ %q | %q | %q ]" $GIT_BRANCH $GIT_TAG $GIT_SHA)
|
|
|
|
|
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 $@
|