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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
TANABE Ken-ichi
September 26, 2014
Technology
0
1.4k
Ship cli tools for cross-platform with Github + wecker
TANABE Ken-ichi
September 26, 2014
Tweet
Share
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
64
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
150
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
390
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
AI駆動PjMの理想像 と現在地 -実践例を添えて-
masahiro_okamura
1
110
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.3k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
OpenShiftでllm-dを動かそう!
jpishikawa
0
100
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
560
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
530
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
90
sira's awesome portfolio website redesign presentation
elsirapls
0
150
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Prompt Engineering for Job Search
mfonobong
0
160
Embracing the Ebb and Flow
colly
88
5k
Become a Pro
speakerdeck
PRO
31
5.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Why Our Code Smells
bkeepers
PRO
340
58k
Leo the Paperboy
mayatellez
4
1.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
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