Add build.sh for local building

This commit is contained in:
3wc 2023-07-16 16:57:11 +01:00
parent 9781770234
commit f7efbb0490
1 changed files with 16 additions and 0 deletions

16
build.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
if ! type yq; then
echo "$(tput setaf 1)\`yq\` is not availble, please install from https://github.com/mikefarah/yq"
exit 1
fi
eval "$(yq '.steps.[0].commands[]' < .drone.yml)"
TAG="$(yq '.steps.[1].settings.tags' < .drone.yml)"
cd hometown || return 1
docker build -t "$TAG" .
rm -r hometown