#!/bin/bash
git checkout $gitTag

repo=registry.hncy.info/hncy/cd-comprehensive-web
tag=${1:-$gitTag}
echo $tag
git submodule update --init --recursive
if [ ! -f regist-to-eureka/reg2eureka.sh ]; then
    exit 1
fi
rm -rf dist
yarn 
yarn build
docker buildx use desktop-linux 
docker buildx build --platform linux/arm64 -t $repo:$tag . --push