blob: 26612edb7c9b85cfba1355e8e4840642059b5296 (
plain)
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
|
#!/bin/bash
# include some common stuff, like check_workspace, etc..
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${SCRIPT_DIR}/platforms-common.sh
tag=$1
remote=working
check_workspace
# list of dirs I want to tag
dirs=(
build-scripts
model-scripts
ramdisk
recovery
u-boot
uefi/edk2
uefi/edk2/OpenPlatformPkg
tools/uefi-tools
vexpress-firmware
/linaro/g.l.o/landing-teams/working/arm/manifest.git
)
for ((i=0;i<${#dirs[@]};++i)); do
echo dir: ${dirs[i]}
pushd ${dirs[i]} > /dev/null
git rem | grep $remote > /dev/null
ret=$?
if [ "$ret" != "0" ]
then
echo ${dirs[i]} does not have a remote called $remote
exit
fi
# Now do the tagging
git tag -l $tag
count=`git tag -l $tag | wc -l`
if [ "$count" == "0" ]
then
echo "good, the tag doesn't exist"
tmptag=$tag
# handle special cases where the tag is augmented somehow
case "${dirs[i]}" in
"recovery" )
tmptag=`echo $tmptag | sed s#armlt#armlt-juno#`
;;
"vexpress-firmware" )
tmptag=`echo $tmptag | sed s#armlt#armlt-vexpress#`
;;
esac
echo This is the tag: $tmptag
git tag $tmptag
git push $remote $tmptag
else
echo "drat, the tag already exists in ${dirs[i]}"
fi
# done
popd > /dev/null
done
|