forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path100_workflow.sh
More file actions
executable file
·90 lines (79 loc) · 2.24 KB
/
100_workflow.sh
File metadata and controls
executable file
·90 lines (79 loc) · 2.24 KB
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
# Work Workflow shortcuts
# Add all files by default
alias wfds="workflow-demanda-send"
alias wds="workflow-demanda-send"
alias wd="workflow-demanda-send"
function workflow-demanda-send() {
local branch_name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)" # detached HEAD
branch_name=${branch_name##refs/heads/}
git checkout -b "feature/${1:-.}"
git add .
eval git commit -am "\"$@\""
git push origin "feature/${1:-.}"
git checkout "$branch_name"
}
# Add all files by default
alias wffs="workflow-fix-send"
alias wfs="workflow-fix-send"
alias wf="workflow-fix-send"
function workflow-fix-send() {
local branch_name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)" # detached HEAD
branch_name=${branch_name##refs/heads/}
git checkout -b "fix/${1:-.}"
git add .
eval git commit -am "\"$@\""
git push origin "fix/${1:-.}"
git checkout "$branch_name"
}
# Add all files by default
alias wfhs="workflow-hotfix-send"
alias whs="workflow-hotfix-send"
alias wh="workflow-hotfix-send"
function workflow-hotfix-send() {
local branch_name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)" # detached HEAD
branch_name=${branch_name##refs/heads/}
git checkout -b "hotfix/${1:-.}"
git add .
eval git commit -am "\"$@\""
git push origin "hotfix/${1:-.}"
git checkout "$branch_name"
}
# Add all files by default
alias workflow-publish="wfp"
alias wp="wfp"
function wfp() {
local branch_name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)" # detached HEAD
branch_name=${branch_name##refs/heads/}
git checkout dev
git merge "feature/${1:-.}"
git add .
eval git commit -am "\"$@\""
git push origin master
git push origin "feature/${1:-.}"
git checkout "$branch_name"
}
# Add all files by default
alias wftu="workflow-tag-up"
alias wtu="workflow-tag-up"
function workflow-tag-up() {
local release tag count
tag=$(git describe --tags --abbrev=0)
release=$(echo $tag | tr "." "\n")
count=0
for version in $release
do
# count=1+$count
expr $version + 1
echo "$b + 1" | bc -l
echo $(($version + 1))
done
echo "$(($count + 1))"
}