-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdep_alias
172 lines (158 loc) · 3.04 KB
/
dep_alias
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/bin/bash
alias tags='$SR_CODE_BASE/tags'
alias asicd='cd $SRC_DIR/asicd'
alias intfd='cd $SRC_DIR/intf'
alias ufibd='cd $SRC_DIR/ufib'
alias utils='cd $SRC_DIR/utils'
alias lldp='cd $SRC_DIR/lldp'
pipdComps=(
"asicd"
"intf"
"adj"
"ufib"
"lldp"
"pm"
"snapl-tools"
)
pkgComps=(
"asicdIntfPkg"
"asicdUfibPkg"
"adjPkg"
"intfPkg"
"ufibPkg"
)
baseComp=(
"chartpackager"
"platforminitx8664"
"pmd"
)
componentCharts=(
"asicd"
"intfd"
"adjd"
"ufibd"
"lldpd"
)
#snapl docker helper functions
function set_docker_info_reg() {
export MY_DOCKER_USER=jgheewala
export MY_REPOSITORY=jgheewala
export MY_DOCKER_PASS=Snaproute_123
}
#if you want to set comp version..use this function and it will automatically set it.
function chart_version() {
if [ "$1" == "" ]; then
echo "specify component docker version, for e.g: l3_data_path_demo, v1_dev_11"
return
fi
include_chart=""
space_char=" "
termination="\""
pmd_bootstrap=pmd-bootstrap
for comp in "${baseComp[@]}"; do
echo "setting version for comp" $comp
export VERSION_$comp=$1
done
include_chart=$termination
for comp in "${componentCharts[@]}"; do
echo "setting version for comp" $comp
export VERSION_$comp=$1
include_chart=$include_chart$space_char$comp
done
include_chart=$include_chart$space_char$pmd_bootstrap$termination
echo "export chart version" $include_chart
export INCLUDE_CHARTS=$include_chart
}
function branch_status {
echo $SRC_DIR
cd $SRC_DIR
for dir in *; do
cd $dir
echo $dir
git status
cd -
#cd $SR_CODE_BASE
done
cd $SRC_DIR
}
function branch_name {
echo $SRC_DIR
cd $SRC_DIR
for dir in *; do
cd $dir
echo ""
echo $dir
git branch -v
echo ""
cd -
#cd $SR_CODE_BASE
done
cd $SRC_DIR
}
function sync_all_repos {
echo $SRC_DIR
cd $SRC_DIR
for dir in *; do
cd $dir
echo ""
echo $dir
git pull origin master
echo ""
cd -
done
cd $SRC_DIR
}
function remove_vendor {
echo $SRC_DIR
cd $SRC_DIR
for dir in *; do
cd $dir
echo ""
echo $dir
rm -rf vendor
echo ""
cd -
done
cd $SRC_DIR
}
function dep_ensure_pi_pd {
echo $SRC_DIR
cd $SRC_DIR
for comp in "${pipdComps[@]}"; do
echo "updating dep version for" $comp
cd $comp
echo ""
echo $PWD
if [ "$1" == "" ]; then
dep ensure -v
else
dep ensure -v -$1
fi
echo ""
cd -
done
cd $SRC_DIR
}
function pi_pd_make {
echo $SRC_DIR
cd $SRC_DIR
for comp in "${pipdComps[@]}"; do
echo "doing make for" $comp
cd $comp
echo ""
echo $PWD
retVal=$?
if [ "$1" == "" ]; then
make
else
make $1
fi
if [ $retVal -ne 0 ]; then
echo "Error"
return
fi
echo ""
cd -
done
cd $SRC_DIR
}