Skip to content

Commit a351729

Browse files
chore(release): jctong/prepare release 3.1.0 beta (#213)
1 parent 155c5ea commit a351729

File tree

6 files changed

+33
-13
lines changed

6 files changed

+33
-13
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ jobs:
7474
os: osx
7575
osx_image: xcode10.1
7676
env:
77-
- VERSION=3.0.2
77+
- VERSION=3.1.0-beta
7878
install:
7979
# install hub
8080
- wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub
81+
# upgrade cocoapods
82+
- gem install cocoapods -v '1.6.1'
8183
script:
8284
- Scripts/run_prep.sh
8385

@@ -87,9 +89,11 @@ jobs:
8789
os: osx
8890
osx_image: xcode10.1
8991
env:
90-
- VERSION=3.0.2
92+
- VERSION=3.1.0-beta
9193
install:
9294
# install hub
9395
- wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub
96+
# upgrade cocoapods
97+
- gem install cocoapods -v '1.6.1'
9498
script:
9599
- Scripts/run_release.sh

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Optimizely Swift SDK Changelog
22

33
## 3.1.0-beta
4-
May 28, 2019
4+
May 30, 2019
55

6-
This the initial release of the Swift SDK. It is a pure Swift implementation take complete advantage of language features and performance. It supports objective-C as well through objective-c only API. It uses Swift 4.2 but we will be upgrading to 5.0 soon.
6+
This is the initial release of the Swift SDK. It is a pure Swift implementation which takes complete advantage of language features and performance. It supports Objective-C applications as well. It uses Swift 4.2 but we will be upgrading to 5.0 soon.
77

88
This modernized version of the SDK is meant to replace the Objective-C SDK.
99

@@ -15,4 +15,3 @@ This modernized version of the SDK is meant to replace the Objective-C SDK.
1515
### Bug Fixes:
1616

1717
### Breaking Changes
18-

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Optimizely Rollouts is free feature flags for development teams. Easily roll out
1515

1616
### Using the SDK
1717

18-
See the [Mobile developer documentation](https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=swift&platform=mobile) or [OTT developer documentation](https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=swift&platform=ott) to learn how to set
18+
See the [Mobile developer documentation](https://docs.developers.optimizely.com/full-stack/docs/implement-the-ios-sdk-310-beta) or [OTT developer documentation](https://docs.developers.optimizely.com/full-stack/docs/implement-the-ios-sdk-310-beta) to learn how to set
1919
up an Optimizely X project and start using the SDK.
2020

2121
### Requirements
@@ -25,10 +25,10 @@ up an Optimizely X project and start using the SDK.
2525

2626
Please note below that _\<platform\>_ is used to represent the platform on which you are building your app. Currently, we support ```iOS``` and ```tvOS``` platforms.
2727

28-
#### Cocoapod
28+
#### CocoaPods
2929
1. Add the following lines to the _Podfile_:<pre>
3030
```use_frameworks!```
31-
```pod 'OptimizelySwiftSDK', :git => 'https://github.com/optimizely/swift-sdk.git', :branch => 'master'```
31+
```pod 'OptimizelySwiftSDK', '3.1.0-beta'```
3232
</pre>
3333

3434
2. Run the following command: <pre>``` pod install ```</pre>
@@ -38,7 +38,7 @@ Further installation instructions for Cocoapods: https://guides.cocoapods.org/us
3838
We haven't actually published to Cocoapods yet.
3939

4040
#### Carthage
41-
1. Add the following lines to the _Cartfile_:<pre>```github "optimizely/swift-sdk" "master"```</pre>
41+
1. Add the following lines to the _Cartfile_:<pre>```github "optimizely/swift-sdk" == 3.1.0-beta```</pre>
4242

4343
2. Run the following command:<pre>```carthage update```</pre>
4444

Scripts/run_prep.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ function do_stuff {
4343
trap "kill $!" EXIT
4444
trap 'error_handler' ERR
4545

46-
myscripts=( "build_all.sh" "test_all.sh" "update_version.sh ${VERSION}" )
46+
# we need pod install or test_all.sh fails
47+
pod install
48+
49+
myscripts=( "update_version.sh ${VERSION}" "build_all.sh" "test_all.sh" )
4750
for i in "${myscripts[@]}"; do
4851
echo -n "${i} "
4952
Scripts/${i} >> $BUILD_OUTPUT 2>&1
@@ -57,7 +60,21 @@ function do_stuff {
5760
function push_changes {
5861
git config user.email "[email protected]"
5962
git config user.name "${GITHUB_USER}"
60-
git add --all && git commit -m "ci(travis): auto release prep for $VERSION"
63+
git add --all
64+
# this is like a try/catch
65+
git commit -m "ci(travis): auto release prep for $VERSION" ||
66+
{
67+
case $? in
68+
1 )
69+
echo -e "${COLOR_CYAN}INFO: ${COLOR_RESET}Nothing to commit, so not creating a PR"
70+
exit 0
71+
;;
72+
* )
73+
echo -e "${COLOR_CYAN}ERROR: ${COLOR_RESET}Unexpected exit code while trying to git commit"
74+
exit 1
75+
;;
76+
esac
77+
}
6178
git push https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG} ${AUTOBRANCH}
6279
PR_URL=$(hub pull-request --no-edit -b ${TRAVIS_BRANCH})
6380
echo -e "${COLOR_CYAN}ATTENTION:${COLOR_RESET} review and merge ${COLOR_CYAN}${PR_URL}${COLOR_RESET}"

Scripts/run_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function release_github {
2020
NEW_VERSION=$(grep '^## \d\+\.\d\+.\d\+' ${CHANGELOG} | awk 'NR==1')
2121
LAST_VERSION=$(grep '^## \d\+\.\d\+.\d\+' ${CHANGELOG} | awk 'NR==2')
2222

23-
DESCRIPTION=$(awk "/^${NEW_VERSION}$/,/^${LAST_VERSION}$/" ${CHANGELOG} | grep -v "^${LAST_VERSION}$")
23+
DESCRIPTION=$(awk "/^${NEW_VERSION}$/,/^${LAST_VERSION:-nothingmatched}$/" ${CHANGELOG} | grep -v "^${LAST_VERSION:-nothingmatched}$")
2424

2525
hub release create v${VERSION} -m "Release ${VERSION}" -m "${DESCRIPTION}"
2626

Scripts/update_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ if [ "${vm}" == "${releaseSDKVersion}" ]; then
7171
printf "\t[${curPodSpec}] Verified podspec: ${vm} === ${releaseSDKVersion}\n"
7272
fi
7373

74-
printf "\n\n[SUCCESS] All release-skd-version settings have been updated successfully!\n\n\n"
74+
printf "\n\n[SUCCESS] All release-sdk-version settings have been updated successfully!\n\n\n"

0 commit comments

Comments
 (0)