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
Ship cli tools for cross-platform with Github +...
Search
TANABE Ken-ichi
September 26, 2014
Technology
1.4k
0
Share
Ship cli tools for cross-platform with Github + wecker
TANABE Ken-ichi
September 26, 2014
More Decks by TANABE Ken-ichi
See All by TANABE Ken-ichi
AAA: An ACME Agent for AWS environment
nabeken
0
3.5k
Introduction to Terraform
nabeken
0
2.6k
The Twelve-Factor Apps
nabeken
0
68
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
5
1.8k
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
120
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
390
Chasing Real-Time Observability for CRuby
whitegreen
0
200
AndroidアプリとCopilot Studioの統合
nakasho
0
120
「誰一人取り残されない」 AIエージェント時代のプロダクト設計思想 Product Management Summit 2026
mizushimac
1
1.5k
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
950
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
12
4.8k
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
750
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
120
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
470
CloudTrail を見つめ直してみる
kazzpapa3
1
110
Featured
See All Featured
Leo the Paperboy
mayatellez
7
1.7k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
We Are The Robots
honzajavorek
0
220
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
520
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
180
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
220
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Transcript
Ship cli tools for cross- platform w/Github + wecker 2014/09/26@HDE
MTS TANABE Ken-ichi
動機 • OS X, Linux, Windows向けにcliツールを配布 したい • 開発者以外にも使ってほしい ◦
APIを叩いて何か処理をしたり ◦ 簡単なサーバを起動してデータをやりとりしたり • いつものようにCIしつつビルド、リリースまで自動 化したい
道具 • Go ◦ クロスプラットフォーム (OS X, Linux, Windows, BSD)
◦ 単一バイナリ ◦ 豊富な標準ライブラリ (syscallからnet/httpまで) • Github ◦ ソースコードリポジトリ • Wercker ◦ ビルド環境を自由に作成できるCI as a Service ◦ goxcを使い、クロスコンパイル ◦ 成果物をGithub Releasesへデプロイ
goxc • goxcを使うと以下を自動的に実行 ◦ 各プラットフォーム向けツールチェインのビルド (必要なら) ◦ クロスコンパイル ◦ プラットフォーム毎にアーカイブ
• goxcももちろんGoで書かれていてダウンロードする だけで動作する goxc -tasks='xc archive' -bc 'linux,amd64,386 darwin,amd64,386'
wercker (workerと読む) • Dockerのコンテナのように ビルド環境をboxとして自 由に構築、共有できる • 成果物のデプロイプロセス も定義できる •
サービスはまだベータの 位置付け
wercker (build) • YAMLでビルドプ ロセスを定義 • go {get, build, test,
fmt} • 最後にgoxcでビ ルド
wercker (one-click deployment) herokuなどのPaaS にもデプロイ可能
wercker (deploy) • UIから手動デプロイ • 特定ブランチへの pushに応じて自動 デプロイ
参考文献 • “pecoのバイナリ配布の話” http://lestrrat.ldblog.jp/archives/39736492.html • “Wercker で Go のプロジェクトをクロスコンパイルし、 Github
にリリースする” http://motemen.hatenablog. com/entry/2014/06/27/xcompile-go-and-release-to- github-with-wercker • nabeken/docker-cleaner (上をまねて作った) https://github.com/nabeken/docker-cleaner