Created
October 24, 2013 16:38
-
-
Save danielctull/7140568 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "Starting Tag and upload to TestFlight with configuration: ${CONFIGURATION}" | |
| if [[ ${CONFIGURATION} != "Release" ]]; then | |
| exit | |
| fi | |
| cd ${SRCROOT} | |
| PREVIOUSTAG=`git tag | grep "$s." | sort -r | head -1` | |
| TAG="s.`git log --oneline | wc -l | tr -d ' '`" | |
| echo "Previous tag: $PREVIOUSTAG" | |
| echo "New tag: $TAG" | |
| if [[ $TAG == $PREVIOUSTAG ]]; then | |
| exit | |
| fi | |
| CHANGELOG=`git log $PREVIOUSTAG..HEAD --merges --pretty=format:"* %s" --reverse | grep -v "$Merge branch"` | |
| FIRSTCHAR=$(echo "$CHANGELOG" | head -c 1) | |
| if [[ "$FIRSTCHAR" != "*" ]]; then | |
| CHANGELOG="No release notes with this build." | |
| fi | |
| echo "$CHANGELOG" | |
| git tag -a -m "$CHANGELOG" $TAG | |
| git push origin --tags | |
| API_TOKEN="" | |
| TEAM_TOKEN="" | |
| DISTRIBUTION_LISTS="Issues" | |
| APP="${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${WRAPPER_NAME}" | |
| IPA="${BUILT_PRODUCTS_DIR}.ipa" | |
| rm -f "$IPA" | |
| xcrun -sdk iphoneos PackageApplication -v "$APP" -o "$IPA" | |
| curl "http://testflightapp.com/api/builds.json" \ | |
| -F file=@"$IPA" \ | |
| -F api_token="$API_TOKEN" \ | |
| -F team_token="$TEAM_TOKEN" \ | |
| -F notes="$CHANGELOG" \ | |
| -F distribution_lists="$DISTRIBUTION_LISTS" \ | |
| -F notify=True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment