mirror of
https://github.com/InsanusMokrassar/BooruGrabberTelegramBot.git
synced 2024-12-22 14:17:11 +00:00
25 lines
664 B
Plaintext
25 lines
664 B
Plaintext
|
#!/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
|
||
|
version="`grep ./gradle.properties -e "^version=" | sed -e "s/version=\(.*\)/\1/"`"
|
||
|
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
|