MicroUtils/build_and_publish.sh

19 lines
419 B
Bash
Raw Permalink Normal View History

2020-09-27 16:55:50 +00:00
#!/bin/bash
function assert_success() {
"${@}"
local status=${?}
if [ ${status} -ne 0 ]; then
echo "### Error ${status} at: ${BASH_LINENO[*]} ###"
exit ${status}
fi
}
2020-09-27 17:40:03 +00:00
export RELEASE_MODE=true
project="$1"
2020-09-27 16:55:50 +00:00
2020-11-10 14:53:08 +00:00
assert_success ./gradlew clean
assert_success ./gradlew "$project:build"
assert_success ./gradlew "$project:publishToMavenLocal"
assert_success ./gradlew "$project:bintrayUpload"