Last active
September 6, 2017 01:52
-
-
Save Leko/e6d205993466ce7865a905259b6d18a2 to your computer and use it in GitHub Desktop.
Build ReactNative application via CLI
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
#!/usr/bin/env bash | |
# Usage: | |
# build-ios <SCHEME> <EXPORT_PLIST> | |
# | |
# SCHEME: | |
# EXPORT_PLIST: | |
set -eu | |
SCHEME=$1 | |
EXPORT_PLIST=$2 | |
PROJECT=$(find ios/*.xcodeproj | head -n1) | |
mkdir -p target | |
xcodebuild \ | |
-project "$PROJECT" \ | |
-scheme "$SCHEME" \ | |
archive \ | |
-archivePath "./target/$SCHEME.xcarchive" | |
xcodebuild \ | |
-exportArchive \ | |
-archivePath "./target/$SCHEME.xcarchive" \ | |
-exportPath ./target \ | |
-exportOptionsPlist $EXPORT_PLIST | |
echo -e "\e[33mArchive: ./target/$SCHEME.xcarchive\e[m" | |
echo -e "\e[33mIPA: ./target/$SCHEME.ipa\e[m" |
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
#!/usr/bin/env bash | |
# Usage: | |
# DEPLOY_GATE_TOKEN=XXXXX deploy <apk or ipa path> [DEPLOYGATE_USERNAME] [DEPLOY_MESSAGE] | |
set -eux | |
PKG_PATH=$1 | |
DEPLOYGATE_USERNAME=$2 | |
DEPLOY_MESSAGE=${3:-$(git log --oneline --no-merges -n1 --color=never)} | |
curl \ | |
-F "token=$DEPLOY_GATE_TOKEN" \ | |
-F "file=@$PKG_PATH" \ | |
-F "message=$DEPLOY_MESSAGE" \ | |
https://deploygate.com/api/users/$DEPLOYGATE_USERNAME/apps |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- app-store, ad-hoc, package, enterprise, development, developer-id --> | |
<key>method</key> | |
<string>ad-hoc</string> | |
<key>uploadBitcode</key> | |
<false/> | |
<key>uploadSymbols</key> | |
<true/> | |
</dict> | |
</plist> |
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
# http://crunchybagel.com/auto-incrementing-build-numbers-in-xcode/ | |
PROJECT=$1 | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$PROJECT/Info.plist") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$PROJECT/Info.plist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment