Add integration between pol and mysql charms
[osm/devops.git] / tools / deletetag.sh
1 #!/bin/bash
2 if [ $# -ne 2 ]; then
3 echo "Usage $0 <repo> <tag>"
4 exit 1
5 fi
6
7 TAG="$2"
8 tag_header="OSM Release TWO:"
9 tag_message="$tag_header version $TAG"
10
11 modules="juju-charms devops descriptor-packages openvim RO SO UI osmclient"
12 list=""
13 for i in $modules; do
14 if [ "$1" == "$i" -o "$1" == "all" ]; then
15 list="$1"
16 break
17 fi
18 done
19
20 [ "$1" == "all" ] && list=$modules
21
22 if [ -z "$list" ]; then
23 echo "Repo must be one of these: $modules all"
24 exit 1
25 fi
26
27 for i in $list; do
28 echo
29 echo $i
30 git -C $i fetch
31 echo "Deleting tag $tag in repo $i"
32 git -C $i tag -d $tag
33 git -C $i push origin :refs/tags/$tag
34 sleep 2
35 done
36
37 exit 0
38