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
440
Launch Arguments - the mysteries
supermarin
1
170
Swift for CLI tools
supermarin
15
25k
CocoaPods intro
supermarin
2
200
Private pods - best practices
supermarin
1
140
Alcatraz internals
supermarin
2
250
ObjectiveSugar & ObjectiveRecord
supermarin
5
490
Alcatraz - Xcode package manager
supermarin
3
280
BubbleWrap
supermarin
3
300
Other Decks in Programming
See All in Programming
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
110
エラーレスポンス設計から考える、0→1開発におけるGraphQLへの向き合い方
bicstone
5
1.5k
Mastering AsyncSequence - 使う・作る・他のデザインパターン(クロージャ、Delegate など)から移行する
treastrain
4
1.6k
Swift Concurrencyとレースコンディション
objectiveaudio
1
410
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
220
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
440
Web技術を駆使してユーザーの画面を「録画」する
yukukotani
13
6.6k
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
790
GraphQL あるいは React における自律的なデータ取得について
quramy
11
2.9k
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
140
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Web Components: a chance to create the future
zenorocha
308
42k
GraphQLとの向き合い方2022年版
quramy
43
13k
Atom: Resistance is Futile
akmur
261
25k
Adopting Sorbet at Scale
ufuk
73
8.9k
From Idea to $5000 a Month in 5 Months
shpigford
379
46k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
227
52k
The Invisible Customer
myddelton
119
13k
Large-scale JavaScript Application Architecture
addyosmani
508
110k
Scaling GitHub
holman
458
140k
What's new in Ruby 2.0
geeforr
340
31k
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