-
Notifications
You must be signed in to change notification settings - Fork 130
/
git.toml
84 lines (68 loc) · 1.69 KB
/
git.toml
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
[tasks.pre-git-add]
category = "Git"
[tasks.git-add]
description = "Runs the git add command."
category = "Git"
command = "git"
args = ["add", "."]
[tasks.post-git-add]
category = "Git"
[tasks.pre-git-status]
category = "Git"
[tasks.git-status]
description = "Runs git status command."
category = "Git"
command = "git"
args = ["status"]
[tasks.post-git-status]
category = "Git"
[tasks.pre-git-commit]
category = "Git"
[tasks.git-commit]
description = "Runs git commit command."
category = "Git"
command = "git"
args = ["commit"]
[tasks.git-commit-message]
description = "Runs git commit command with the message defined in the COMMIT_MSG environment variable."
category = "Git"
condition = { env_set = ["COMMIT_MSG"] }
command = "git"
args = ["commit", "-m", "${COMMIT_MSG}"]
[tasks.post-git-commit]
category = "Git"
[tasks.pre-git-push]
category = "Git"
[tasks.git-push]
description = "Runs git push command."
category = "Git"
command = "git"
args = ["push", "@@split(CARGO_MAKE_GIT_PUSH_ARGS, )"]
[tasks.post-git-push]
category = "Git"
[tasks.git-pull]
description = "Runs git pull command."
category = "Git"
command = "git"
args = ["pull"]
[tasks.git-delete-merged-branches]
description = "Deletes any merged git branches"
category = "Git"
ignore_errors = true
condition = { platforms = ["linux", "mac"] }
script = '''
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
'''
[tasks.git-diff-files]
description = "Run diff on two provided files."
category = "Tools"
ignore_errors = true
condition = { env_set = ["CARGO_MAKE_DIFF_FILE1", "CARGO_MAKE_DIFF_FILE2"] }
command = "git"
args = [
"--no-pager",
"diff",
"--no-index",
"${CARGO_MAKE_DIFF_FILE1}",
"${CARGO_MAKE_DIFF_FILE2}",
]