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.4k
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
80
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
20260801_スクフェス大阪
kgnkhkr
2
1.2k
toio・myCobotでフィジカルAIっぽいことを行うための検討(とりあえず調査) / フィジカルAI LT(IoTLTによる開催)
you
PRO
0
300
ガバメントクラウドでのランサムウェア対策
techniczna
2
1k
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
200
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
660
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
【CEDEC2026】専門性の高いデフォルメチームが挑んだ人材育成戦略 〜Cygames Academiaの企画から実施まで〜
cygames
PRO
0
530
システム思考で問題に対処する
yussak
0
200
関東Kaggler会発表資料
takoi
1
190
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
5
1.4k
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
6
2.2k
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
200
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.2k
Building an army of robots
kneath
306
46k
Automating Front-end Workflow
addyosmani
1370
210k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
450
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
260
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
410
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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