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
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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.6k
Introduction to Terraform
nabeken
0
2.7k
The Twelve-Factor Apps
nabeken
0
84
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
2
720
AIレビュー時代に必要なのは、SLOで引く撤退ライン
nobuoooo
0
150
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
54k
atproto spaces概要
yamarten
0
110
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
暗号化?某ファイルストレージはどうなるの!? 3rd Partyとうまく付き合う秘密度ラベル設計
kasada
0
210
本番に近いテストをもっと手軽に - Postmanで広がるAPIテストの世界 / Expanding the World of API Testing with Postman
yokawasa
1
130
500名弱規模の組織のPythonプロジェクト(dbt) をどう管理するか?
hiracky16
0
360
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
Point Cloud as a Foreign Language for Multi-modal Large Language Model
takmin
0
300
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.3k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
510
Facilitating Awesome Meetings
lara
57
7.1k
Music & Morning Musume
bryan
47
7.3k
WENDY [Excerpt]
tessaabrams
12
39k
The SEO identity crisis: Don't let AI make you average
varn
0
540
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
The Pragmatic Product Professional
lauravandoore
37
7.4k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
670
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
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