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
go-selfupdate-github で ツールを自己アップデートする
Search
Linda_pp
April 15, 2018
Technology
4.6k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
go-selfupdate-github で ツールを自己アップデートする
GoCon 2018 Spring LT
Linda_pp
April 15, 2018
More Decks by Linda_pp
See All by Linda_pp
actionlint の Linter 設計
rhysd
7
6.6k
ripgrep をライブラリとして使う
rhysd
0
750
port-monolith-to-wasm-for-chrome-extension
rhysd
0
560
Fuzzing Rust Text Editor
rhysd
1
3.1k
Vim compiled to WebAssembly
rhysd
5
2.4k
about-neovim-0.4.0-floating-window
rhysd
3
2.4k
reply.vim
rhysd
0
1.4k
Vim ported to WebAssembly (VimConf 2018)
rhysd
4
3.6k
小さく始めて育てるコンパイラ
rhysd
13
5k
Other Decks in Technology
See All in Technology
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
2
320
インフラと開発の垣根を超えていき!〜元AWSインフラエンジニアがAWS開発で奮闘している話〜
hatahata021
3
300
誤解だらけの開発生産性 / Myths and Misconceptions about Developer Productivity
i35_267
2
800
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.8k
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
9
4k
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
420
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.5k
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
550
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
160
実践!既存 Project への AI-Driven Development 適用〜 一ヶ月で Project 唯一のフロントエンドエンジニアを作り出せ〜
lycorptech_jp
PRO
0
230
AICoEでAIネイティブ組織への進化
yukiogawa
0
200
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
The Cost Of JavaScript in 2023
addyosmani
55
10k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Between Models and Reality
mayunak
4
370
For a Future-Friendly Web
brad_frost
183
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Transcript
go-selfupdate-github Ͱ πʔϧΛࣗݾΞοϓσʔτ͢Δ Go Con 2018 Spring LT @Linda_pp @rhysd
GoͷCLIπʔϧͷΞοϓσʔτͲ ͏ͯ͠·͔͢ʁ • go get -u • γεςϜͷύοέʔδϚωʔδϟʢbrew ͳ ͲʣΛ͏
• GitHub ͷϦϦʔεϖʔδ͔Β࠷৽൛Λμϯ ϩʔυ͢Δ
go get -u • ϦϦʔε͢Δඞཁͳָͯ͘ʢϝϯςφʣ • ৗʹϦϙδτϦͷ HEAD ΛϏϧυ͢ΔͷͰ unstableʢϢʔβʣ
• Go ͷ։ൃڥͷΠϯετʔϧ͕ඞཁʢϢʔ βʣ
γεςϜͷύοέʔδϚωʔδϟ ʢbrewͳͲʣΛ͏ • ࠷৽ͷ stable ൛ΛָʹೖΕΒΕΔʢϢʔβʣ • OSʹΑͬͯΓํ͕ҧ͏ʢϢʔβ&ϝϯς φʣ •
ύοέʔδొ͕େมʢϝϯςφʣ
GitHub ͷϦϦʔεϖʔδ͔Β࠷ ৽൛Λμϯϩʔυ͢Δ • ࠷৽ͷ stable ൛ΛೖΕΒΕΔʢϢʔβʣ • gox
ghr ͳͲͰ؆୯ϦϦʔεʢϝϯςφʣ • खͰμϯϩʔυͯ͘͠Δͷ͕໘ʢϢʔβʣ
ͲΕҰҰ
GitHub ͷϦϦʔεϖʔδ͔Β࠷ ৽൛Λμϯϩʔυ͢Δ • ࠷৽ͷ stable ൛ΛೖΕΒΕΔʢϢʔβʣ • gox
ghr ͳͲͰ؆୯ϦϦʔεʢϝϯςφʣ • खͰμϯϩʔυͯ͘͠Δͷ͕໘ʢϢʔβʣ • खͰμϯϩʔυͯ͘͠Δͷ͕໘ʢϢʔβʣ ࣗಈԽͰ͖ΔͷͰʁ
go-github-selfupdate όΠφϦΛࣗݾΞοϓσʔτ͢ΔΈΛఏڙ ͢ΔϥΠϒϥϦ https://github.com/rhysd/go-github-selfupdate
go-github-selfupdate • GitHub ͷϦϦʔεϖʔδ͔Β࠷৽൛ͷόΠφ ϦΛࣗಈݕग़ʢsemver Λఆʣ • ϦϦʔεϖʔδ͔ΒόΠφϦΛࣗಈμϯϩʔ υʢ+ղౚʣ •
࣮ߦϑΝΠϧΛࣗಈஔ͖͑
import ( "log" "github.com/blang/semver" "github.com/rhysd/go-github-selfupdate/selfupdate" ) const current = "1.2.3"
func doSelfUpdate() { v := semver.MustParse(current) latest, err := selfupdate.UpdateSelf(v, "myname/myrepo") if err != nil { log.Panicln("Binary update failed:", err) } if latest.Version.Equals(v) { log.Println("Current binary is the latest", current) } else { log.Println( "Updated to", latest.Version, "Release note:\n", latest.ReleaseNotes, ) } }
GitHub ͷϦϦʔεϖʔδ + go-github-selfupdate • ࠷৽ͷ stable ൛ΛೖΕΒΕΔʢϢʔβʣ • gox
ghr ͳͲͰ؆୯ϦϦʔεʢϝϯςφʣ • खͰμϯϩʔυͯ͘͠Δͷ͕໘ʢϢʔβʣ • ίϚϯυҰൃͰࣗಈΞοϓσʔτʢϢʔβʣ
go-github-selfupdate ৄࡉ • ✔ Linux, Windows, macOS Ͱ CI •
✔ ϓϥΠϕʔτϦϙδτϦରԠ • ✔ GitHub Enterprise ରԠ • ✔ ࣮ߦϑΝΠϧஔ͖ࣦ͑ഊ࣌ͷϩʔϧόοΫ • ✔ ѹॖܗࣜɿzip, tar, gzip, xzip
ࢀߟϦϯΫ • ϦϙδτϦ: • https://github.com/rhysd/go-github-selfupdate • υΩϡϝϯτ: • https://godoc.org/github.com/rhysd/go-github-selfupdate/ selfupdate
• ϥούʔϥΠϒϥϦ: • https://github.com/Songmu/ghselfupdate • ϒϩάهࣄ: • https://rhysd.hatenablog.com/entry/2017/12/30/220214 @Linda_pp @rhysd CZ