Score
0
Watch 27 Star 140 Fork 39

码农俱乐部 / bbs-goGo

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
bbs-go 是一款基于 Go 语言开发的论坛系统,采用前后端分离技术,Go 语言提供 api 进行数据支撑,用户界面使用 Nuxt.js 进行渲染,后台界面基于 element-ui spread retract

  • Vue 47.8%
  • Go 43.3%
  • JavaScript 4.0%
  • CSS 2.9%
  • TSQL 0.7%
  • Other 1.3%
Clone or download
build.sh 1.41 KB
Copy Edit Web IDE Raw Blame History
大猫猫 authored 2019-11-04 17:24 . .
#!/bin/bash
### 构建要求
### 1. go >= 1.13
### 2. node >= 8
baseDir=`echo $PWD`
serverDir=`echo $baseDir/server`
siteDir=`echo $baseDir/site`
adminDir=`echo $baseDir/admin`
distDir=`echo $baseDir/dist`
# go version
# go env
# echo $baseDir
# echo $serverDir
# echo $siteDir
# echo $adminDir
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'
}
funcBuildAdmin() {
echo 'admin module building...'
cd $adminDir
npm install --registry=https://registry.npm.taobao.org
npm run build
echo 'admin module building...finished'
}
funcTouchDir() {
if [ ! -d "$1" ]; then
mkdir $1
fi
}
funcCleanBuild() {
rm -rf $distDir/*
funcTouchDir $distDir/server
funcTouchDir $distDir/site
funcTouchDir $distDir/admin
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/
cp -r $adminDir/dist/* $distDir/admin/
}
funcBuildServer
funcBuildSite
funcBuildAdmin
funcCleanBuild
echo 'done!!!'

Comment ( 0 )

Sign in for post a comment

Go
1
https://gitee.com/mlogclub/bbs-go.git
git@gitee.com:mlogclub/bbs-go.git
mlogclub
bbs-go
bbs-go
master

Help Search