Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
460
Launch Arguments - the mysteries
supermarin
1
210
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
230
Private pods - best practices
supermarin
1
180
Alcatraz internals
supermarin
2
290
ObjectiveSugar & ObjectiveRecord
supermarin
5
560
Alcatraz - Xcode package manager
supermarin
3
310
BubbleWrap
supermarin
3
330
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
130
React Nativeならぬ"Vue Native"が実現するかも?_新世代マルチプラットフォーム開発フレームワークのLynxとLynxのVue.js対応を追ってみよう_Vue Lynx
yut0naga1_fa
2
1.8k
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
理論と実務のギャップを超える
eycjur
0
190
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
110
Google Opalで使える37のライブラリ
mickey_kubo
3
150
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
ALL CODE BASE ARE BELONG TO STUDY
uzulla
28
6.8k
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
We Have a Design System, Now What?
morganepeng
53
7.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
YesSQL, Process and Tooling at Scale
rocio
173
15k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
130k
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