Slide 1

Slide 1 text

at u-aizu LT spring ࣗ࡞ CLI πʔϧͷϫʔΫϑϩʔͱ ͦΕΛࢧ͑Δٕज़

Slide 2

Slide 2 text

!LUS@ LUSɺΩλϩʔ ձ௡େֶT XIPBNJ

Slide 3

Slide 3 text

!LUS@ LUSɺΩλϩʔ ձ௡େֶT ແ৬ XIPBNJ

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

$-*πʔϧͷ ϝϯςφϯεͷ໰୊

Slide 8

Slide 8 text

w ΞοϓσʔτΛ఻͑Δखஈ͕ͳ͍ w खಈͰ ܧଓతʹϦϦʔε͢Δίετ ϝϯςφαΠυ

Slide 9

Slide 9 text

w ࠷৽͔Ͳ͏͔෼͔Βͳ͍ w Ξοϓσʔτ͕खؒ ϢʔβαΠυ

Slide 10

Slide 10 text

w (PQIFSɺαʔόΤϯδχΞҎ֎΋
 Ϣʔβͱͯ͠૝ఆ w ࠷దͳΠϯετʔϧํ๏Λఏڙ͍ͨ͠ LUSFWBOT

Slide 11

Slide 11 text

w Ϣʔβ͸Πϯετʔϧํ๏ΛબΜͰΠϯετʔϧ w Ϣʔβ͸ΞοϓσʔτΛߦ͏͔ΛબͿ͚ͩ w ΞοϓσʔτΛ֬ೝͤ͞ͳ͍ w Ξοϓσʔτํ๏Λߟ͑ͤ͞ͳ͍ ΄Μͱ͏ʹඞཁͳ͜ͱ

Slide 12

Slide 12 text

˞ Ҏ߱ͷϑϩʔ͸(PϓϩδΣΫτΛ લఏͱ͍ͯ͠·͢

Slide 13

Slide 13 text

$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump

Slide 14

Slide 14 text

w ϓϩδΣΫτͷόʔδϣχϯά w $*ͱ࿈ܞͨ͠ϏϧυɺϦϦʔε w πʔϧͷࣗಈతͳΞοϓσʔτ $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump

Slide 15

Slide 15 text

$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump LUSHPTFNWFS

Slide 16

Slide 16 text

ηϚϯςΟοΫόʔδϣχϯά 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

Slide 17

Slide 17 text

"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 }

Slide 18

Slide 18 text

NJUDIFMMIHPYUDOLTNHIS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump

Slide 19

Slide 19 text

ෳ਺ϓϥοτϑΥʔϜ޲͚ʹϏϧυ (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

Slide 20

Slide 20 text

LUSHPVQEBUFS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump

Slide 21

Slide 21 text

w ࣗಈΞοϓσʔτ༻ϥΠϒϥϦ w ೚ҙͷखஈ .FBOT ͰΞοϓσʔτ͕Մೳ LUSHPVQEBUFS

Slide 22

Slide 22 text

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) } }

Slide 23

Slide 23 text

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) } }

Slide 24

Slide 24 text

$-*Ϟʔυ 3&1-Ϟʔυ autoUpdate
 USVF ΞοϓσʔτΛ
 ߦΘͳ͍ ϓϩϯϓτඇදࣔ ඇಉظΞοϓσʔτ autoUpdate GBMTF ΞοϓσʔτΛ
 ߦΘͳ͍ ϓϩϯϓτදࣔ ಉظΞοϓσʔτ

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

w HPTFNWFSʹΑΔόʔδϣχϯά w HPYHISʹΑΔϏϧυɺϦϦʔε w HPVQEBUFSʹΑΓɺΞοϓσʔτखॱʹ
 ؔ͢Δ஌ࣝΛϢʔβ͔Β׬શʹ෼཭ ·ͱΊ

Slide 27

Slide 27 text

w IUUQTNPUFNFOIBUFOBCMPHDPNFOUSZ HPHPCVNQWFSTJPOJOH w IUUQTEFFFFUDPNXSJUJOHHIS w IUUQTTZGNIBUFOBCMPHDPNFOUSZ ࢀߟ

Slide 28

Slide 28 text

w (P-PHPJT$PQZSJHIU5IF(P"VUIPST "MMSJHIUTSFTFSWFE $PQZSJHIU