BooruGrabberTelegramBot/nonsudo_deploy

25 lines
678 B
Plaintext
Raw Normal View History

2023-10-05 14:40:01 +00:00
#!/bin/bash
function send_notification() {
echo "$1"
}
function assert_success() {
"${@}"
local status=${?}
if [ ${status} -ne 0 ]; then
send_notification "### Error ${status} at: ${BASH_LINENO[*]} ###"
exit ${status}
fi
}
app=booru_grabber_bot
2023-10-05 16:44:09 +00:00
version="`grep ./gradle.properties -e "^docker_version=" | sed -e "s/docker_version=\(.*\)/\1/"`"
2023-10-05 14:40:01 +00:00
server=insanusmokrassar
assert_success docker build -t $app:"$version" .
assert_success docker tag $app:"$version" $server/$app:$version
assert_success docker tag $app:"$version" $server/$app:latest
assert_success docker push $server/$app:$version
assert_success docker push $server/$app:latest