代码拉取完成,页面将自动刷新
#!/bin/bash
if [ -z "$1" ]; then
read -p "Task (build|push|all) : " TASK
else
TASK=$1
fi
if [ -z "$2" ]; then
read -p "Release version: " RELEASE
else
RELEASE=$2
fi
IMAGE="budtmo/docker-android"
FILE_NAME=docker/Genymotion
image_version="$IMAGE-genymotion:$RELEASE"
image_latest="$IMAGE-genymotion:latest"
function build() {
echo "[BUILD] Image name: $image_version and $image_latest"
echo "[BUILD] Dockerfile: $FILE_NAME"
docker build -t $image_version --build-arg TOKEN=$TOKEN --build-arg APP_RELEASE_VERSION=$RELEASE -f $FILE_NAME .
docker tag $image_version $image_latest
}
function push() {
echo "[PUSH] Image name: $image_version and $image_latest"
docker push $image_version
docker push $image_latest
}
case $TASK in
build)
build
;;
push)
push
;;
all)
build
push
;;
*)
echo "Invalid environment! Valid options: test, build, push, all"
;;
esac
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。