60 Star 457 Fork 145

GVP码农俱乐部 / bbs-go

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
build.sh 1.14 KB
Copy Edit Web IDE Raw Blame History
大猫猫 authored 2020-04-16 20:34 . eslint fix
#!/bin/bash
### 构建要求
### 1. go >= 1.13
### 2. node >= 8
baseDir=`echo $PWD`
serverDir=`echo $baseDir/server`
siteDir=`echo $baseDir/site`
distDir=`echo $baseDir/dist`
# go version
# go env
# echo $baseDir
# echo $serverDir
# echo $siteDir
funcBuildServer() {
echo 'server module building...'
export GOPROXY=https://goproxy.cn
cd $serverDir
go mod download
go build
echo 'server module building...finished'
}
funcBuildSite() {
echo 'site module building...'
cd $siteDir
npm install --registry=https://registry.npm.taobao.org
npm run build
echo 'site module building...finished'
}
funcTouchDir() {
if [ ! -d "$1" ]; then
mkdir $1
fi
}
funcCleanBuild() {
rm -rf $distDir/*
funcTouchDir $distDir/server
funcTouchDir $distDir/site
cp $serverDir/bbs-go $distDir/server/
cp -r $siteDir/.nuxt $distDir/site/
cp -r $siteDir/static $distDir/site/
cp -r $siteDir/nuxt.config.js $distDir/site/
cp -r $siteDir/package.json $distDir/site/
}
funcBuildServer
funcBuildSite
funcCleanBuild
echo 'done!!!'
Go
1
https://gitee.com/mlogclub/bbs-go.git
git@gitee.com:mlogclub/bbs-go.git
mlogclub
bbs-go
bbs-go
master

Search

152606 8668e384 1899542 133635 2cd7d36e 1899542