17 lines
315 B
Bash
17 lines
315 B
Bash
|
|
#!/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
|