forked from gitana/gitana-javascript-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·80 lines (49 loc) · 931 Bytes
/
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
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
#!/bin/bash
VERSION="$(node server/version)"
BRANCH="$VERSION-release"
ZIP="gitana-javascript-driver-$VERSION.zip"
echo Deploying version $VERSION
#
# SETUP
#
# switch to master branch
# create a local branch <version>-release
git checkout master
git checkout -b $BRANCH
#
# STEP 1: BUILD DRIVER, JSDOCS AND DEPLOY TO CDN
#
# build driver
ant clean package
# build jsdoc
grunt jsdoc
# add the ./dist directory to the commit
git add dist -f
# commit changes to local branch
git commit -m "gitana driver release build $VERSION"
#
# STEP 2: PUBLISH DISTRIBUTION FILES TO CDN
#
# push to S3
grunt aws_s3
# invalidate cloudfront (CDN)
#grunt invalidate_cloudfront
#
# STEP 3: TAG REPO FOR BOWER
#
# create a tag
git tag $VERSION
# push the tag
git push origin $VERSION
#
# STEP 4: NPM Publish
#
sh npmjs.sh
#
# TEARDOWN
#
# delete local branch
git checkout master
git branch -D $BRANCH
# cleanup
ant clean