2022-09-07 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
|
|
|
|
version=0.0.1
|
|
|
|
server=hub.docker.com
|
|
|
|
|
2023-04-16 07:28:40 +00:00
|
|
|
assert_success ./gradlew build
|
2022-09-07 14:40:01 +00:00
|
|
|
# scp ./build/distributions/AutoPostTestTelegramBot-1.0.0.zip ./config.json developer@insanusmokrassar.dev:/tmp/
|
|
|
|
assert_success sudo docker build -t $app:"$version" .
|
|
|
|
assert_success sudo docker tag $app:"$version" $server/$app:$version
|
|
|
|
assert_success sudo docker tag $app:"$version" $server/$app:latest
|
|
|
|
assert_success sudo docker push $server/$app:$version
|
|
|
|
assert_success sudo docker push $server/$app:latest
|