mirror of
https://github.com/InsanusMokrassar/ConfigurableInlineTelegramBot.git
synced 2024-11-25 11:38:51 +00:00
29 lines
680 B
Bash
Executable File
29 lines
680 B
Bash
Executable File
#!/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
|
|
}
|
|
|
|
user=insanusmokrassar
|
|
app=configurable_inline_telegram_bot
|
|
version=0.1
|
|
|
|
export DOCKER_BUILD=true
|
|
assert_success ./gradlew build
|
|
export DOCKER_BUILD=false
|
|
|
|
assert_success docker build -t $app:"$version" .
|
|
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
|