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
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.4k
Introduction to Terraform
nabeken
0
2.5k
The Twelve-Factor Apps
nabeken
0
55
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
Transformerを用いたアイテム間の 相互影響を考慮したレコメンドリスト生成
recruitengineers
PRO
2
510
ソフトウェアQAがハードウェアの人になったの
mineo_matsuya
3
230
ポストコロナ時代の SaaS におけるコスト削減の意義
izzii
1
480
Deep Security Conference 2025:生成AI時代のセキュリティ監視 /dsc2025-genai-secmon
mizutani
4
3.2k
QAを早期に巻き込む”って どうやるの? モヤモヤから抜け出す実践知
moritamasami
2
120
AWS 怖い話 WAF編 @fillz_noh #AWSStartup #AWSStartup_Kansai
fillznoh
0
140
安定した基盤システムのためのライブラリ選定
kakehashi
PRO
3
140
無理しない AI 活用サービス / #jazug
koudaiii
0
110
エンジニアリングマネージャー“お悩み相談”パネルセッション
ar_tama
1
240
ABEMAの本番環境負荷試験への挑戦
mk2taiga
5
1.3k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
820
[SRE NEXT 2025] すみずみまで暖かく照らすあなたの太陽でありたい
carnappopper
2
560
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
25
1.7k
KATA
mclloyd
30
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Facilitating Awesome Meetings
lara
54
6.5k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Why Our Code Smells
bkeepers
PRO
337
57k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
A Modern Web Designer's Workflow
chriscoyier
695
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
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