forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunpublish.sh
executable file
·56 lines (49 loc) · 1.27 KB
/
unpublish.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
56
#!/bin/bash
# Script for removing tags from the Angular bower repos
echo "#################################"
echo "#### Untag bower ################"
echo "#################################"
ARG_DEFS=(
"--action=(prepare|publish)"
"--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)"
)
function init {
TMP_DIR=$(resolveDir ../../tmp)
REPOS=(
angular
angular-animate
angular-aria
angular-cookies
angular-i18n
angular-loader
angular-messages
angular-mocks
angular-route
angular-resource
angular-sanitize
angular-scenario
angular-touch
)
}
function prepare {
:
}
function publish {
for repo in "${REPOS[@]}"
do
tags=`git ls-remote --tags [email protected]:angular/bower-$repo`
if [[ $tags =~ "refs/tags/v$VERSION_NUMBER" ]]; then
echo "-- Creating dummy git repo for bower-$repo with origin remote"
mkdir $TMP_DIR/bower-$repo
cd $TMP_DIR/bower-$repo
git init
git remote add origin [email protected]:angular/bower-$repo.git
git push origin :v$VERSION_NUMBER
echo "-- Deleting v$VERSION_NUMBER tag from bower-$repo"
cd $SCRIPT_DIR
else
echo "-- No remote tag matching v$VERSION_NUMBER exists on bower-$repo"
fi
done
}
source $(dirname $0)/../utils.inc