-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.sh
executable file
·46 lines (39 loc) · 1.07 KB
/
release.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
#!/usr/bin/env bash
set -ue
rm -rf repo/
git clone https://github.com/angular-ui/bootstrap.git repo/ --branch gh-pages --depth 1
rm -rf package/
mkdir package/
cd package/
cp ../repo/ui-bootstrap-$1.js ui-bootstrap.js
cp ../repo/ui-bootstrap-$1.min.js ui-bootstrap.min.js
cp ../repo/ui-bootstrap-tpls-$1.js ui-bootstrap-tpls.js
cp ../repo/ui-bootstrap-tpls-$1.min.js ui-bootstrap-tpls.min.js
IFS=$'\n' LINES=($(find . -depth 1 | grep -v '\.min\.js$' | awk '{print "\"" $0 "\""}'))
MAIN=$(printf ", %s" "${LINES[@]}")
MAIN=${MAIN:1}
cat <<EOF > bower.json
{
"name": "angular-ui-bootstrap-complete",
"version": "$1",
"description": "AngularJS UI Bootstrap with optional default template injection",
"keywords": [
"angular",
"angular-ui-bootstrap",
"angular-ui",
"angularjs",
"bootstrap",
"template",
"templates",
"ui-bootstrap"
],
"main": [ $MAIN ],
"license": "MIT"
}
EOF
git init
git remote add origin https://github.com/datapad/bower-angular-ui-bootstrap-complete.git
git add -A
git commit -m "$1"
git tag "$1"
git push origin --tags -f