Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.6k
The Twelve-Factor Apps
nabeken
0
57
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
AI/MLのマルチテナント基盤を支えるコンテナ技術
pfn
PRO
4
490
LangChain v1.0にトライ~ AIエージェントアプリの移行(v0.3 → v1.0) ~
happysamurai294
0
140
インフラ室事例集
mixi_engineers
PRO
2
160
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
21k
AIにおける自由の追求
shujisado
1
390
Bakuraku Engineering Team Deck
layerx
PRO
3
130
Digitization部 紹介資料
sansan33
PRO
1
6.1k
[続・営業向け 誰でも話せるOCI セールストーク] AWSよりOCIの優位性が分からない編(2025年11月21日開催)
oracle4engineer
PRO
1
200
AI駆動開発2025年振り返りとTips集
knr109
1
150
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.2k
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
210
小規模チームによる衛星管制システムの開発とスケーラビリティの実現
sankichi92
0
170
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Facilitating Awesome Meetings
lara
57
6.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Automating Front-end Workflow
addyosmani
1371
200k
Bash Introduction
62gerente
615
210k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
How to train your dragon (web standard)
notwaldorf
97
6.4k
The Language of Interfaces
destraynor
162
25k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
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