mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-29 08:44:15 +01:00
30 lines
682 B
Bash
Executable File
30 lines
682 B
Bash
Executable File
#!/bin/bash
|
|
|
|
BUILDER_IMAGE="ghcr.io/polprzewodnikowy/sc64env:v1.4"
|
|
|
|
pushd $(dirname $0) > /dev/null
|
|
|
|
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
GIT_TAG=$(git describe --tags 2> /dev/null)
|
|
GIT_SHA=$(git rev-parse HEAD)
|
|
|
|
if [ -t 1 ]; then
|
|
DOCKER_OPTIONS="-it"
|
|
fi
|
|
|
|
docker run \
|
|
$DOCKER_OPTIONS \
|
|
--rm \
|
|
--privileged \
|
|
--user $(id -u):$(id -g) \
|
|
--mac-address ${MAC_ADDRESS:-F8:12:34:56:78:90} \
|
|
--mount type=bind,src="$(pwd)/flexlm",target="/flexlm" \
|
|
--mount type=bind,src="$(pwd)",target="/workdir" \
|
|
-e GIT_BRANCH="$GIT_BRANCH" \
|
|
-e GIT_TAG="$GIT_TAG" \
|
|
-e GIT_SHA="$GIT_SHA" \
|
|
$BUILDER_IMAGE \
|
|
./build.sh $@
|
|
|
|
popd > /dev/null
|