File tree Expand file tree Collapse file tree 4 files changed +38
-3463
lines changed
Expand file tree Collapse file tree 4 files changed +38
-3463
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ [ $# -eq 0 ] && { echo " Usage: $0 1.0.0" ; exit 1; }
4+
5+ VERSION_NO_V=$1
6+ VERSION=" v" $VERSION_NO_V
7+ DATE=$( date " +%Y-%m-%d" )
8+
9+ echo " Releasing Branch Web SDK"
10+
11+ make release
12+
13+ ./deployment/build-example-html.sh " key_live_hcnegAumkH7Kv18M8AOHhfgiohpXq5tB" " https://api2.branch.io" " https://cdn.branch.io/branch-latest.min.js"
14+ aws s3 cp example.html s3://branch-builds/example.html
15+
16+ aws s3 cp --content-type=" text/javascript" --content-encoding=" gzip" dist/build.min.js.gz s3://branch-cdn/branch-$VERSION .min.js --acl public-read
17+ aws s3 cp --content-type=" text/javascript" --content-encoding=" gzip" dist/build.min.js.gz s3://branch-cdn/branch-latest.min.js --acl public-read
18+
19+ echo -en " Invalidating cloudfront distribution...\n"
20+ aws configure set preview.cloudfront true
21+ aws cloudfront create-invalidation --distribution-id E10P37NG0GMER --paths /branch-latest.min.js
22+
23+ npm publish
24+
25+ echo " Post-release sanity checks."
26+ read -p " Can you visit https://cdn.branch.io/branch-$VERSION .min.js ?" -n 1 -r
27+ echo
28+ read -p " Is https://cdn.branch.io/example.html using the right version number $VERSION ?" -n 1 -r
29+ echo
30+ read -p " Is https://www.npmjs.com/package/branch-sdk using the right version number $VERSION ?" -n 1 -r
31+ echo
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ [ $# -eq 0 ] && { echo " Usage: $0 1.0.0" ; exit 1; }
4+
5+ sed -i -e " s/version = '.*';$/version = '$1 ';/" package.json
6+ sed -i -e " s/version = '.*';$/version = '$1 ';/" src/0_config.js
7+ sed -i -e " s/version = '.*';$/version = '$1 ';/" test/web-config.js
You can’t perform that action at this time.
0 commit comments