$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CLI apps. For fun and profit
Search
Marin Usalj
May 29, 2014
Programming
4
16k
CLI apps. For fun and profit
Talk given at Cocoa Kucha on #inspect conference, May 2014
Marin Usalj
May 29, 2014
Tweet
Share
More Decks by Marin Usalj
See All by Marin Usalj
Code signing on iOS/OSX
supermarin
2
470
Launch Arguments - the mysteries
supermarin
1
220
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
240
Private pods - best practices
supermarin
1
180
Alcatraz internals
supermarin
2
310
ObjectiveSugar & ObjectiveRecord
supermarin
5
560
Alcatraz - Xcode package manager
supermarin
3
320
BubbleWrap
supermarin
3
330
Other Decks in Programming
See All in Programming
React Native New Architecture 移行実践報告
taminif
1
120
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
5
930
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
3
1.3k
How Software Deployment tools have changed in the past 20 years
geshan
0
26k
dotfiles 式年遷宮 令和最新版
masawada
1
350
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
180
Module Harmony
petamoriken
2
590
Atomics APIを知る / Understanding Atomics API
ssssota
1
230
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
160
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
670
All(?) About Point Sets
hole
0
240
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
190
Featured
See All Featured
Scaling GitHub
holman
464
140k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Done Done
chrislema
186
16k
A Tale of Four Properties
chriscoyier
162
23k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Faster Mobile Websites
deanohume
310
31k
GitHub's CSS Performance
jonrohan
1032
470k
RailsConf 2023
tenderlove
30
1.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Transcript
CLI APPS. FOR FUN AND PROFIT @SUPERMARIN
WHEN FUNCTIONALITY NOT SUPPORTED BY GUI IT'S HARD TO AUTOMATE
TASKS ENDLESS POSSIBILITIES
HOW DO I RUBY, GO, PYTHON, EVEN OBJECTIVE-C
PIPELINE CAT BUILD.LOG | GREP ERROR | WC -L
STATUS CODES $ XCODEBUILD | TEE XCODEBUILD.LOG | XCPRETTY
XCODEBUILD FAILS, STATUS 0
PIPESTATUS [] $ xcodebuild | tee output.log | xcpretty $?
=> 0 ${PIPESTATUS[0]} => 65 ${PIPESTATUS[2]} => 0 $ xcodebuild | tee output.log | xcpretty; exit ${PIPESTATUS[0]}
SET -O PIPEFAIL $ xcodebuild | tee output.log | xcpretty
$ echo $? => 65
BEWARE OF YOUR $SHELL | $SHELL | Exit status |
Pipe status | Set a var | |--------|-------------|---------------|-------------| | bash | $? | $PIPESTATUS | export VAR= | |--------|-------------|---------------|-------------| | zsh | $status | $pipestatus | export VAR= | |--------|-------------|---------------|-------------| | fish | $status | / | set -x VAR |
#! #!/USR/BIN/ENV RUBY
POSIX FLAGS $ COMMAND --VERBOSE --COLOR = $ COMMAND -VC
(ONLY IN SILICON VALLEY)
CLI FRAMEWORKS DON'T DIY
XCPRETTY GITHUB.COM/SUPERMARIN/XCPRETTY
SUCH HTML
WHY IN THE WORLD? THERE'S XCTOOL
XCTOOL(XCODEBUILD) -FLAG -FLAG WRAPPING XCODEBUILD, RECREATING FLAGS
XCODEBUILD -FLAG -FLAG | XCPRETTY USING VANILLA XCODEBUILD
XCTOOL - TESTS maintaining separate settings XCODEBUILD - BETA XCODEBUILD
- APPSTORE maintaining separate settings
USED BY RUBYMOTION FACEBOOK (POP) AFNETWORKING KIWI YAMMER THOUGHTBOT MANY
OTHERS
<3 HIPBYTE YAMMER @KATTRALI