-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bb6bdc6
Showing
60 changed files
with
4,247 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/bats/ | ||
/bats.log/ | ||
/**/.relax/ | ||
/**/build/ | ||
/**/Releases/ | ||
/**/artifact/ | ||
/**/xcuserdata/ | ||
/**/resign |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Shin Yamamoto | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: test | ||
test: bats | ||
@PATH="$$PWD/bats/bin:$$PWD/bin:$$PATH" bats test | ||
|
||
.PHONY: test-integration | ||
test-integration: | ||
@PATH="$$PWD/bats/bin:$$PWD/bin:$$PWD/shims:$$PATH" SWIFTENV_ROOT="$$PWD" bats test/integration | ||
|
||
bats: | ||
git clone --depth 1 https://github.com/sstephenson/bats.git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Relax | ||
|
||
relax is a stable and comfortable release tool for Xcode. It makes you freed from xcodebuild stuffs. | ||
|
||
# Installation | ||
|
||
```bash | ||
$brew tap SCENEE/homebrew-formulae | ||
$brew install relax | ||
``` | ||
# Requirement | ||
|
||
- Xcode8.0+ (relax might be working as your project settings on Xcode 7.3.1) | ||
|
||
# Getting Started | ||
|
||
## Set up `Relfile` | ||
|
||
Run this command and set up each configurations in `Relfile`. | ||
|
||
```bash | ||
$relax init | ||
``` | ||
|
||
An example of Relfile is here. | ||
|
||
```yaml | ||
workspace: SampleApp | ||
|
||
development: | ||
scheme: SampleApp | ||
configuration: Debug | ||
build_settings: | ||
- OTHER_SWIFT_FLAGS: "-DMOCK" | ||
|
||
adhoc: | ||
scheme: SampleApp | ||
team_id: COMPANY_TEAM_ID | ||
bundle_version_format: %R-%C | ||
export_options: | ||
method: ad-hoc | ||
|
||
enterprise: | ||
scheme: SampleApp | ||
team_id: ENTERPRISE_TEAM_ID | ||
export_options: | ||
method: enterprise | ||
|
||
appstore: | ||
scheme: SampleApp | ||
sdk: iphoneos | ||
configuration: Release | ||
team_id: COMPANY_TEAM_ID | ||
export_options: | ||
method: appstore | ||
|
||
log_formatter: xcpretty | ||
``` | ||
## Build a xcarchive | ||
```bash | ||
$relax -v archive adhoc | ||
``` | ||
|
||
## Export an .ipa file | ||
|
||
```bash | ||
$relax export adhoc --latest | ||
``` | ||
|
||
## Check the provisioning profile and the entitlements of an .ipa file | ||
|
||
```bash | ||
$relax validate /path/to/SampleApp.ipa | ||
``` | ||
|
||
## Upload your ipa to Crashlytics | ||
|
||
```bash | ||
$relax upload crashlytics /path/to/SampleApp.ipa | ||
``` | ||
|
||
## Resign an .ipa file with a provisioning profile and a certificate | ||
|
||
```bash | ||
$relax resign -p "<my-provisioning-profile>" -c "iPhone Distribution: <Me>" /path/to/SampleApp.ipa | ||
``` | ||
|
||
# Help | ||
|
||
```bash | ||
$relax help | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
TODO | ||
====== | ||
|
||
Common | ||
------ | ||
|
||
- [L] Write man page with Ronn. | ||
|
||
Export | ||
------ | ||
|
||
- [L] Handle the remaining Export Options. | ||
- embedOnDemandResourcesAssetPacksInBundle | ||
- manifest | ||
- onDemandResourcesAssetPacksBaseURL | ||
- iCloudContainerEnvironment |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../libexec/relax |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
_relax() { | ||
local cur prev words cword | ||
|
||
COMPREPLY=() | ||
cur=${COMP_WORDS[COMP_CWORD]} | ||
prev=${COMP_WORDS[COMP_CWORD-1]} | ||
words=("${COMP_WORDS[@]}") | ||
|
||
local special i | ||
for (( i=0; i < ${#words[@]}-1; i++ )); do | ||
commands="$(relax commands | grep -v -- --version | tr " " "\|")" | ||
if echo ${words[i]} | grep -q "$commands" ; then | ||
special=${words[i]} | ||
fi | ||
done | ||
|
||
if [[ -n $special ]]; then | ||
case $special in | ||
archive|build|export|show|package) | ||
if [[ $prev = $special ]]; then | ||
COMPREPLY=( $( compgen -W "$(relax completions releases)" -- $cur ) ) | ||
else | ||
COMPREPLY=( $( compgen -W "$(relax $special --complete $prev)" -- $cur ) ) | ||
fi | ||
return | ||
;; | ||
upload) | ||
if [[ $prev = $special ]]; then | ||
COMPREPLY=( $( compgen -W "$(relax $special --complete)" -- $cur ) ) | ||
fi | ||
return | ||
;; | ||
*) | ||
COMPREPLY=() | ||
return | ||
;; | ||
esac | ||
fi | ||
|
||
case "$prev" in | ||
--config) | ||
_filedir | ||
;; | ||
esac | ||
|
||
case "$cur" in | ||
*) | ||
COMPREPLY=( $(compgen -W "$(relax commands)" -- "$cur") ) | ||
;; | ||
esac | ||
} | ||
|
||
complete -o default -F _relax relax |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# | ||
# Relax configuration YAML | ||
# | ||
|
||
--- | ||
|
||
# Required 'xcodeproj' OR 'workspace' | ||
xcodeproj: WORKSPACE | ||
workspace: XCODEPROJ | ||
|
||
development: # Required | ||
scheme: SCHEME # Required | ||
sdk: SDK # Required. i.e. iphoneos, iphoneos10.0 | ||
configuration: CONFIGURATION # Required, i.e. Release | ||
|
||
bundle_identifier: com.example.{{ PRODUCT_NAME }} # Optional. Change the default bundle identifier in a project | ||
team_id: J3D7L9FHSS # Optional | ||
|
||
pre-hook: "logi \"$ARROW Update Build Number\"; agvtool next-version -all" | ||
|
||
provisioning_profile: "Scenee Wild Card Dev" | ||
|
||
## Bundle version format | ||
# %V: Version number | ||
# %v: Bundle number | ||
# %C: Build configuration | ||
# %R: SCM commit ref | ||
# %B: SCM branch name | ||
####################### | ||
bundle_version_format: %R-%C | ||
export_options: | ||
# Describes how Xcode should export the archive. | ||
# Available options: app-store, package, ad-hoc, enterprise, development, and developer-id. | ||
# The list of options varies based on the type of archive. Defaults to development. | ||
method: development # Required. | ||
|
||
# For App Store exports, should the package include symbols? Defaults to YES. | ||
upload_symbols: true # Optional. | ||
|
||
# For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES. | ||
compileBitcode: true # Optional. | ||
|
||
# TODO: For non-App Store exports, if the app uses On Demand Resources and this is YES, asset packs are embedded in the app bundle so that the app can be tested without a server to host asset packs. Defaults to YES unless onDemandResourcesAssetPacksBaseURL is specified. | ||
#embedOnDemandResourcesAssetPacksInBundle: true # Optional. | ||
|
||
# The Developer Portal team to use for this export. Defaults to the team used to build the archive. | ||
team_id: XXXXXX # Optional. | ||
|
||
# For App Store exports, should the package include bitcode? Defaults to YES. | ||
uploadBitcode : true # Optional. | ||
|
||
# For non-App Store exports, should Xcode thin the package for one or more device variants? Available options: <none> (Xcode produces a non-thinned universal app), <thin-for-all-variants> (Xcode produces a universal app and all available thinned variants), or a model identifier for a specific device (e.g. "iPhone7,1"). Defaults to <none>. | ||
thinning : "iPhone7,1" | ||
|
||
# TODO: For non-App Store exports, users can download your app over the web by opening your distribution manifest file in a web browser. To generate a distribution manifest, the value of this key should be a dictionary with three sub-keys: appURL, displayImageURL, fullSizeImageURL. The additional sub-key assetPackManifestURL is required when using on demand resources. | ||
# manifest : Dictionary | ||
|
||
# TODO: For non-App Store exports, if the app uses On Demand Resources and embedOnDemandResourcesAssetPacksInBundle isn't YES, this should be a base URL specifying where asset packs are going to be hosted. This configures the app to download asset packs from the specified URL. | ||
# onDemandResourcesAssetPacksBaseURL : String | ||
|
||
# TODO: For non-App Store exports, if the app is using CloudKit, this configures the "com.apple.developer.icloud-container-environment" entitlement. Available options: Development and Production. Defaults to Development. | ||
#iCloudContainerEnvironment: | ||
|
||
|
||
adhoc: | ||
scheme: SCHEME | ||
team: uiekk | ||
|
||
appstore: | ||
scheme: SCHEME | ||
team: uiekk | ||
|
||
enterprise: | ||
scheme: SCHEME | ||
team: uiekk_enterprise | ||
|
||
... | ||
--- | ||
|
||
log_formatter: xcpretty # Optional | ||
|
||
crashlytics: | ||
token: __TOKEN__ | ||
secret: __SECRET__ | ||
group: __GROUP__ | ||
|
||
testfairy: | ||
api_key: __API_KEY__ | ||
metrics: __METRICS__ | ||
groups: __GROUPS__ | ||
video: __VIDEO__ | ||
notfiy: __NOTIFY__ | ||
... | ||
|
||
# vim: set sts=2 sw=2 ts=2 ft=yaml expandtab :¬ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?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> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
export NC='\033[0m' # Reset Color | ||
|
||
# Regular Colors | ||
export BLACK='\033[0;30m' # Black | ||
export RED='\033[0;31m' # Red | ||
export GREEN='\033[0;32m' # Green | ||
export YELLOW='\033[0;33m' # Yellow | ||
export BLUE='\033[0;34m' # Blue | ||
export PURPLE='\033[0;35m' # Purple | ||
export CYAN='\033[0;36m' # Cyan | ||
export WHITE='\033[0;37m' # White | ||
export BOLD='\033[1m' # Black |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/Schemes/ { | ||
print "xcode_schemes=()" | ||
while (1) { | ||
if ( (getline foo) > 0 ) { | ||
if ( foo ~ /^ *$/ ) { | ||
break | ||
} | ||
gsub(/^ */,"", foo) | ||
gsub(/ *$/,"", foo) | ||
gsub(" ","_", foo) | ||
print "xcode_schemes+=(\""foo"\")" | ||
} | ||
else { | ||
break | ||
} | ||
} | ||
print "export xcode_schemes" | ||
} |
Oops, something went wrong.