ConfigurableInlineTelegramBot/deploy

29 lines
680 B
Plaintext
Raw Normal View History

2021-02-02 13:15:42 +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
}
2021-02-02 13:39:20 +00:00
user=insanusmokrassar
2021-02-02 13:34:24 +00:00
app=configurable_inline_telegram_bot
2021-02-02 13:15:42 +00:00
version=0.1
2021-02-02 13:34:24 +00:00
export DOCKER_BUILD=true
2021-02-02 13:15:42 +00:00
assert_success ./gradlew build
export DOCKER_BUILD=false
2021-02-02 13:15:42 +00:00
assert_success docker build -t $app:"$version" .
2021-02-02 13:39:20 +00:00
assert_success docker tag $app:"$version" $user/$app:$version
assert_success docker tag $app:"$version" $user/$app:latest
assert_success docker push $user/$app:$version
assert_success docker push $user/$app:latest