Skip to content

Commit 19d77f3

Browse files
authored
增加makefile快速打包插件 (flipped-aurora#1173)
* 更新插件快捷打包 使用方法:make plugin PLUGIN="这里是插件文件夹名称,默认为email"
1 parent b352365 commit 19d77f3

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

.github/workflows/docker-cicd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Sed Config
2020
shell: bash
2121
run: |
22-
sed -i 51c"\ && yarn install && yarn build" Makefile
22+
sed -i 56c"\ && yarn install && yarn build" Makefile
2323
make image TAGS_OPT="latest"
2424
sed -i 's#./entrypoint.sh"#./entrypoint.sh","actions"#g' deploy/docker/Dockerfile
2525
sed -i "s#COPY build/ /usr/share/nginx/html/#COPY . /opt/gva#g" deploy/docker/Dockerfile

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ TAGS_OPT = latest
1919
else
2020
endif
2121

22+
ifeq ($(PLUGIN),)
23+
PLUGIN = email
24+
else
25+
endif
26+
2227
#容器环境前后端共同打包
2328
build: build-web build-server
2429
docker run --name build-local --rm -v $(shell pwd):/go/src/${PROJECT_NAME} -w /go/src/${PROJECT_NAME} ${BUILD_IMAGE_SERVER} make build-local
@@ -63,4 +68,11 @@ image: build
6368

6469
#尝鲜版
6570
images: build build-image-web build-image-server
66-
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .
71+
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .
72+
73+
#插件快捷打包: make plugin PLUGIN="这里是插件文件夹名称,默认为email"
74+
plugin:
75+
if [ -d ".plugin" ];then rm -rf .plugin ; else echo "OK!"; fi && mkdir -p .plugin/${PLUGIN}/{server/plugin,web/plugin} \
76+
&& if [ -d "server/plugin/${PLUGIN}" ];then cp -r server/plugin/${PLUGIN} .plugin/${PLUGIN}/server/plugin/ ; else echo "OK!"; fi \
77+
&& if [ -d "web/src/plugin/${PLUGIN}" ];then cp -r web/src/plugin/${PLUGIN} .plugin/${PLUGIN}/web/plugin/ ; else echo "OK!"; fi \
78+
&& cd .plugin && zip -r ${PLUGIN}.zip ${PLUGIN} && mv ${PLUGIN}.zip ../ && cd ..

README-en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ English | [简体中文](./README.md)
2525

2626
[From the environment to the deployment of teaching videos](https://www.bilibili.com/video/BV1fV411y7dT)
2727

28-
[Development Steps](https://www.gin-vue-admin.com/docs/help) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
28+
[Development Steps](https://www.gin-vue-admin.com/guide/start-quickly/env.html) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
2929

3030
## 1. Basic Introduction
3131

@@ -297,7 +297,7 @@ swag init
297297
| :---: |
298298
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png">
299299

300-
#### [About Us](https://www.gin-vue-admin.com/about/)
300+
#### [About Us](https://www.gin-vue-admin.com/about/join.html)
301301

302302
## 8. Contributors
303303

@@ -309,7 +309,7 @@ Thank you for considering your contribution to gin-vue-admin!
309309

310310
## 9. Donate
311311

312-
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](https://www.gin-vue-admin.com/docs/coffee)
312+
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](https://www.gin-vue-admin.com/coffee/index.html)
313313

314314
## 10. Commercial considerations
315315

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ swag init
370370

371371
添加微信,备注"加入gin-vue-admin交流群"
372372

373-
### [关于我们](https://www.gin-vue-admin.com/about/)
373+
### [关于我们](https://www.gin-vue-admin.com/about/join.html)
374374

375375
## 8. 贡献者
376376

@@ -382,7 +382,7 @@ swag init
382382

383383
## 9. 捐赠
384384

385-
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](https://www.gin-vue-admin.com/docs/coffee)
385+
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](https://www.gin-vue-admin.com/coffee/index.html)
386386

387387
## 10. 友情链接
388388

deploy/docker-compose/docker-compose-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
#command: bash -c "yarn config set registry https://registry.npm.taobao.org --global && yarn install && yarn serve"
2929
command: bash -c "yarn install && yarn serve"
3030
volumes:
31-
- ./web:/web
31+
- ../../web:/web
3232
networks:
3333
network:
3434
ipv4_address: 177.7.0.11
@@ -44,7 +44,7 @@ services:
4444
- mysql
4545
- redis
4646
volumes:
47-
- ./server:/server
47+
- ../../server:/server
4848
working_dir: /server # 如果docker 设置了workdir 则此处不需要设置
4949
command: bash -c "go env -w GOPROXY=https://goproxy.cn,direct && go mod tidy && go run main.go"
5050
links:

deploy/docker-compose/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ volumes:
1616
services:
1717
web:
1818
build:
19-
context: ./web
19+
context: ../../web
2020
dockerfile: ./Dockerfile
2121
container_name: gva-web
2222
restart: always
@@ -31,7 +31,7 @@ services:
3131

3232
server:
3333
build:
34-
context: ./server
34+
context: ../../server
3535
dockerfile: ./Dockerfile
3636
container_name: gva-server
3737
restart: always

0 commit comments

Comments
 (0)