mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-11-29 18:57:34 +08:00
29 lines
842 B
Bash
Executable File
29 lines
842 B
Bash
Executable File
#!/bin/bash
|
|
|
|
version=$1
|
|
arch=${2:-amd64}
|
|
|
|
# build go api program
|
|
cd ../api
|
|
make clean $arch
|
|
|
|
# build web app
|
|
cd ../web
|
|
npm run build
|
|
|
|
cd ../build
|
|
|
|
# remove docker image if exists
|
|
docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:$version-$arch
|
|
# build docker image for geekai-go
|
|
docker build -t registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:$version-$arch -f dockerfile-api-go ../
|
|
|
|
# build docker image for geekai-web
|
|
docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:$version-$arch
|
|
docker build -t registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:$version-$arch -f dockerfile-vue ../
|
|
|
|
if [ "$3" = "push" ];then
|
|
docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:$version-$arch
|
|
docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:$version-$arch
|
|
fi
|