Last active
August 29, 2015 14:27
-
-
Save madhikarma/7f06322de5bd3dfac4be to your computer and use it in GitHub Desktop.
Hockey Build Script
This file contains 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
#!/bin/sh | |
set -eo pipefail | |
IFS=$'\n\t' | |
NOW=$(date +%s) | |
RELEASE_NOTES="" | |
BUILD_FILE_NAME="Project-${NOW}" # put file name here | |
API_TOKEN="TODO" # put API token here | |
PROVISIONING_PROFILE_IDENTITY="Some Distribution Profile" | |
CODE_SIGNING_IDENTITY="iPhone Distribution: COMPANY NAME" | |
# Clean | |
xcodebuild clean -workspace "Project.xcworkspace" -scheme "Project" | |
# Build Sandbox | |
xcodebuild -archivePath "${BUILD_FILE_NAME}.xcarchive" -workspace "Project.xcworkspace" -scheme "Project" -configuration "Release" archive | |
xcodebuild -exportArchive -exportFormat ipa -archivePath "${BUILD_FILE_NAME}.xcarchive" -exportPath "${BUILD_FILE_NAME}.ipa" -exportProvisioningProfile "${PROVISIONING_PROFILE_IDENTITY}" -exportSigningIdentity "${CODE_SIGNING_IDENTITY}" | |
# dSYMs | |
# part 1 | |
ZIPPED_DSYM="${BUILD_FILE_NAME}.dSYM.zip" | |
cd "${BUILD_FILE_NAME}.xcarchive/" | |
zip -r "../$ZIPPED_DSYM" "dSYMs/" | |
cd .. | |
# Deploy | |
curl -F "status=2" -F "notify=1" -F "notes=${RELEASE_NOTES}" -F "notes_type=0" -F "ipa=@${BUILD_FILE_NAME}.ipa" -F "dsym=@${ZIPPED_DSYM}" -H "X-HockeyAppToken: @${API_TOKEN}" https://rink.hockeyapp.net/api/2/apps/upload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment