-
Notifications
You must be signed in to change notification settings - Fork 7
/
Taskfile.yml
95 lines (73 loc) · 2.44 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: "3"
#
# sub namespace: https://taskfile.dev/#/usage?id=including-other-taskfiles
#
#includes:
# rs:
# taskfile: ./iDev/coding/rs/
# dir: ./iDev/coding/rs/
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
# env file:
dotenv:
- .env
################################################################################################
tasks:
default:
cmds:
- task: init
init:
cmds:
- cp .env.local .env
- task: install
install:
cmds:
- brew install cookiecutter
- brew install go-task/tap/go-task
################################################################################
#
# 创建 monorepo + go-kratos:
#
new:mono:go-kratos:
cmds:
- cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="mono-repo/go-kratos"
# 创建 monorepo + go-zero:
new:mono:go-zero:
cmds:
- cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="mono-repo/go-zero"
new:mono:gin:
cmds:
- cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="mono-repo/gin"
# rust monorepo:
new:mono:rs:
cmds:
- cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="mono-repo/rs"
################################################################################
#
#
#
new:app:go-kratos:
cmds:
- |
cd your-mono-repo-app-create-root/; \
cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="single-app/go-kratos"
new:app:go-zero:
cmds:
- |
cd your-mono-repo-app-create-root/; \
cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="single-app/go-zero"
################################################################################
new:lib:
cmds:
- cookiecutter https://github.com/better-go/cookiecutter-go.git --directory="library-repo"
################################################################################
push:
cmds:
- git push origin master --tags
- repo_url=`git remote -v | grep push | awk -F ":" '{print $2}' | awk -F ".git" '{print "https://github.com/"$1}'`; open $repo_url