Skip to content

Commit 15eb1d0

Browse files
author
Edward Smith
committed
Sigh. Updated scripts again.
1 parent fdb1879 commit 15eb1d0

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

scripts/deploy-carthage

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ cd ${scriptpath}/../carthage-files
1212

1313
scriptFailed=1
1414
function finish {
15-
if [ $scriptFailed -ne 0 ]
16-
then
15+
if [ $scriptFailed -ne 0 ]; then
1716
echo ">>> Error: $scriptname failed!" 1>&2
1817
exit 1
1918
fi

scripts/deploy-release

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# deploy-release
4+
# deploy-release
5+
# Edward Smith, December 2016
56

67
scriptfile="$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
78
scriptfile="${scriptfile}"/$(basename "$0")
89
cd $(dirname "$scriptfile")/..
910

1011
version=$(./scripts/version)
1112

13+
scriptFailed=1
14+
function finish {
15+
if [ $scriptFailed -ne 0 ]; then
16+
echo ">>> Error: `basename "$scriptfile"` failed!" 1>&2
17+
exit 1
18+
fi
19+
}
20+
trap finish EXIT
21+
22+
1223
if ! ./scripts/askYN "Deploy Branch release version ${version}?"; then
1324
echo ">>> Nothing deployed." 1>&2
1425
exit 1
1526
fi
1627

28+
1729
git_branch=$(git symbolic-ref --short HEAD)
1830

1931
# Prompt for editor input for ChangeLog.
@@ -60,8 +72,8 @@ git commit -m "Updates for ${version} release"
6072
git push
6173
git checkout master
6274
git pull
63-
git merge origin "$git_branch"
64-
git commit
75+
git merge -m "Merge $git_branch" origin "$git_branch"
76+
(git commit || true)
6577
git tag "${version}"
6678
git push
6779
git push --tags origin master
@@ -70,7 +82,7 @@ echo '>>> Pushing Branch Cocoapod...' 1>&2
7082
pod trunk push Branch.podspec
7183

7284

73-
# Finally, deploy the zips to AWS:
85+
# Finally, deploy the zips to AWS:
7486
echo '>>> Uploading to AWS...' 1>&2
7587
aws s3 cp --acl public-read Branch-iOS-SDK.zip s3://branchhost/
7688
aws s3 cp --acl public-read Branch-iOS-TestBed.zip s3://branchhost/
@@ -79,7 +91,16 @@ aws s3 cp --acl public-read Branch-iOS-TestBed.zip s3://branchhost/
7991
open ChangeLog.md
8092
open 'https://github.com/BranchMetrics/ios-branch-deep-linking/releases/new'
8193
open 'https://groups.google.com/forum/#!newtopic/branch-sdk-releases'
94+
open "./carthage-files"
8295
echo "Inform the SDK Releases Group! We've released."
8396
echo "Subject: 'iOS SDK Release $version'"
8497
echo " Body: < The change log >"
98+
echo ""
99+
echo "Also, add the carthage-files 'Branch.framework.zip' to the Github release."
100+
101+
# Remove remnants:
102+
(rm Branch-iOS-SDK.zip || true)
103+
(rm Branch-iOS-TestBed.zip || true)
85104

105+
# Completed OK:
106+
scriptFailed=0

0 commit comments

Comments
 (0)