Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my...
Search
ktr
May 29, 2018
Technology
2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my CLI tool and technologies which supports it
ktr
May 29, 2018
More Decks by ktr
See All by ktr
詳解 MCP Go SDK / MCP Go SDK
ktr_0731
3
690
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
660
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.7k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
11k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
480
Designing libraries in Go way
ktr_0731
6
1.6k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
250
Fuzzy finder as a Go library
ktr_0731
3
6.4k
Other Decks in Technology
See All in Technology
その Valkey 使いこなしていますか?
onk
PRO
5
810
Kiro Crewをはじめよう
kizawa2020
1
150
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
140
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
900
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
130
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
460
パッチ更新でterraform initが落ちた日
grimoh
1
130
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
380
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
210
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
110
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
350
Deep Data Security 機能解説
oracle4engineer
PRO
2
800
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
590
Exploring anti-patterns in Rails
aemeredith
4
540
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Are puppies a ranking factor?
jonoalderson
2
4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Typedesign – Prime Four
hannesfritz
42
3.2k
The browser strikes back
jonoalderson
0
1.8k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Transcript
at u-aizu LT spring ࣗ࡞ CLI πʔϧͷϫʔΫϑϩʔͱ ͦΕΛࢧ͑Δٕज़
!LUS@ LUSɺΩλϩʔ ձେֶT XIPBNJ
!LUS@ LUSɺΩλϩʔ ձେֶT ແ৬ XIPBNJ
None
None
None
$-*πʔϧͷ ϝϯςφϯεͷ
w ΞοϓσʔτΛ͑Δखஈ͕ͳ͍ w खಈͰ ܧଓతʹϦϦʔε͢Δίετ ϝϯςφαΠυ
w ࠷৽͔Ͳ͏͔͔Βͳ͍ w Ξοϓσʔτ͕खؒ ϢʔβαΠυ
w (PQIFSɺαʔόΤϯδχΞҎ֎ Ϣʔβͱͯ͠ఆ w ࠷దͳΠϯετʔϧํ๏Λఏڙ͍ͨ͠ LUSFWBOT
w ϢʔβΠϯετʔϧํ๏ΛબΜͰΠϯετʔϧ w ϢʔβΞοϓσʔτΛߦ͏͔ΛબͿ͚ͩ w ΞοϓσʔτΛ֬ೝͤ͞ͳ͍ w Ξοϓσʔτํ๏Λߟ͑ͤ͞ͳ͍ ΄Μͱ͏ʹඞཁͳ͜ͱ
˞ Ҏ߱ͷϑϩʔ(PϓϩδΣΫτΛ લఏͱ͍ͯ͠·͢
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump
w ϓϩδΣΫτͷόʔδϣχϯά w $*ͱ࿈ܞͨ͠ϏϧυɺϦϦʔε w πʔϧͷࣗಈతͳΞοϓσʔτ $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB
commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump LUSHPTFNWFS
ηϚϯςΟοΫόʔδϣχϯά cmd/bumpʹΑΔߋ৽ LUSHPTFNWFS var v = semver.MustParse("0.3.1") $ bump patch
main.go package main ... var v = semver.MustParse("0.3.2") CLI main.go
"45ม͠ɺόʔδϣϯΛ୳͢ ͜ͱͰɺ҆શʹॻ͖͕͑Մೳ LUSHPTFNWFS *ast.CallExpr { . Fun: *ast.SelectorExpr { .
. X: *ast.Ident { . . . NamePos: meta.go:10:12 . . . Name: "semver" . . } . . Sel: *ast.Ident { . . . NamePos: meta.go:10:19 . . . Name: "MustParse" . . } . } . Lparen: meta.go:10:28 . Args: []ast.Expr (len = 1) { . . 0: *ast.BasicLit { . . . ValuePos: meta.go:10:29 . . . Kind: STRING . . . Value: "\"0.3.1\"" . . } . } . Ellipsis: - . Rparen: meta.go:10:36 }
NJUDIFMMIHPYUDOLTNHIS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
ෳϓϥοτϑΥʔϜ͚ʹϏϧυ (JU)VC3FMFBTFTͷ NJUDIFMMIHPY UDOLTNHIS mitchellh/gox gox -osarch "$OSARCH" . for
f in *; do mv "$f" evans tar cvzf "$f.tar.gz" evans rm -f evans done tcnksm/ghr git tag "$VERSION" git push origin "$VERSION" ghr "$VERSION" pkg
LUSHPVQEBUFS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
w ࣗಈΞοϓσʔτ༻ϥΠϒϥϦ w ҙͷखஈ .FBOT ͰΞοϓσʔτ͕Մೳ LUSHPVQEBUFS
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.NewMeans( github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.SelectAvailableMeansFrom( context.Background(), brew.HomebrewMeans("ktr0731/evans", "evans"), github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
$-*Ϟʔυ 3&1-Ϟʔυ autoUpdate USVF ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτඇදࣔ ඇಉظΞοϓσʔτ autoUpdate GBMTF
ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτදࣔ ಉظΞοϓσʔτ
None
w HPTFNWFSʹΑΔόʔδϣχϯά w HPYHISʹΑΔϏϧυɺϦϦʔε w HPVQEBUFSʹΑΓɺΞοϓσʔτखॱʹ ؔ͢ΔࣝΛϢʔβ͔Βશʹ ·ͱΊ
w IUUQTNPUFNFOIBUFOBCMPHDPNFOUSZ HPHPCVNQWFSTJPOJOH w IUUQTEFFFFUDPNXSJUJOHHIS w IUUQTTZGNIBUFOBCMPHDPNFOUSZ ࢀߟ
w (P-PHPJT$PQZSJHIU5IF(P"VUIPST "MMSJHIUTSFTFSWFE $PQZSJHIU