-
Notifications
You must be signed in to change notification settings - Fork 0
/
branch.sh
55 lines (37 loc) · 1.01 KB
/
branch.sh
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
#!/usr/bin/env bash
source bash-toolbox/init.sh
include app.server.validator.AppServerValidator
include command.validator.CommandValidator
include help.message.HelpMessage
include jira.comment.util.JiraCommentUtil
include repo.Repo
@description prints_a_formatted_Jira_comment
jira(){
local cmd=""
local args="${appServer} ${branch}"
if [[ $@ =~ "nightly" ]]; then
local args="${args} nightly"
fi
case ${1} in
-f|--fixed|fixed) local cmd="fixed" ;;
-n|--nlr|nlr) local cmd="nlr" ;;
-r|--repro|repro) local cmd="repro" ;;
-t|--tested|tested) local cmd="tested" ;;
esac
JiraCommentUtil ${cmd} ${args}
}
main(){
if [[ ! ${1} ]]; then
HelpMessage printHelpMessage
return
fi
CommandValidator validateCommand ${0} ${1}
@param the_app_server_\(optional\)
local appServer=$(AppServerValidator returnAppServer ${@})
@param the_branch_name_\(optional\)
local branch=$(Repo getBranch ${@})
local buildDir=$(Repo getBuildDir ${branch})
local bundleDir=$(Repo getBundleDir ${branch})
${@}
}
main $@