20 lines
448 B
Bash
20 lines
448 B
Bash
run(){
|
|
echo "[RUN] " $*
|
|
$*
|
|
if [ $? -ne 0 ] ;then
|
|
echo "[ERROR] fail"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
NAME=$(cat gradle.properties | grep "projectName"| sed 's/projectName//g' | sed 's/=//g')
|
|
HUB=registry.cn-hangzhou.aliyuncs.com/rsjst
|
|
VERSION=0.1.1
|
|
|
|
|
|
run ./gradlew bootJar -x test
|
|
run docker buildx build -t ${HUB}/${NAME}:${VERSION} \
|
|
--platform=linux/amd64,linux/arm64 \
|
|
. --push
|
|
run echo build and push ${HUB}/${NAME}:${VERSION} success
|