Composerのupdateを自動化した話 / phpstudy-128-composer-update-request
by
hideki kinjyo
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Composer updateΛ ࣗಈԽͨ͠ ୈ128ճ PHPษڧձˏ౦ژ Hideki Kinjyo twitter: @o0h_ / github: o0h
Slide 2
Slide 2 text
ࣗݾհ • ίωώτגࣜձࣾ • αʔόʔαΠυΤϯδχΞ • ओʹCakePHPͳͲ
Slide 3
Slide 3 text
Έͳ͞Μɺ ComposerͷϥΠϒϥϦͷߋ৽ ͍ͯ͠·͔͢ʁ
Slide 4
Slide 4 text
Έͳ͞Μɺ ComposerͷϥΠϒϥϦͷߋ৽ ͍ͯ͠·͢ɾɾɾΑͶʁ
Slide 5
Slide 5 text
ࠓɺ ϥΠϒϥϦߋ৽ʹؔ͢Δ (໘͍͘͞ͳͱײ͡Δ)
Slide 6
Slide 6 text
※ϚαΧϦճආ খ·Ίʹߋ৽͢Δɺ͕ ʮઈରʹਖ਼ղͩʯͱࢥ͍·ͤΜ͕ɻ νʔϜϓϩμΫτʹΑΔͣɻ
Slide 7
Slide 7 text
ϥΠϒϥϦߋ৽ɺαϘ͍ͬͯΔͱ • ͕ࠩσΧ͘ͳΓ͗͢Δͱಈ࡞֬ೝҰେࣄ • ੬ऑੑͱ͔Ξφϯε͞Εͯ ಈ͖औΓͮΒ͔ͬͨΓ • (ຊ࣭తͳϓϩμΫτ։ൃͰͳ͍෦Ͱͷ) ख͕ؒେ͖͘ͳΔ͡Όͳ͍Ͱ͔͢
Slide 8
Slide 8 text
ͱ͍͑ɺͪΐ͍ͪΐ͍໘͍͘͞ • ΕΔ͠ • ಈ࡞֬ೝͱΒͳ͍ͱͩ͠ • ࡞ۀऀʹΑͬͯ֬ೝͷ༰ҧ͍ͦ͏ͩ͠ɻ • खॱॻ࡞Δɾɾʁ • composer.lockͷdiffΈʹ͍͘͠
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
ίίΒลΛ ·ΔͬͱͲ͏ʹ͔͍ͨ͠ʙ
Slide 11
Slide 11 text
ଞݴޠͷ߹ɾɾ
Slide 12
Slide 12 text
JS: npm
Slide 13
Slide 13 text
JS: yarn
Slide 14
Slide 14 text
Ruby: bundle
Slide 15
Slide 15 text
͜Ε͕PHPʹ΄͍͠…ʂ
Slide 16
Slide 16 text
ͭͬͨ͘ɻ ※·ͩ ver 0.1Ͱ͕͢ɻɻ
Slide 17
Slide 17 text
o0h/composer-update-request • উखʹߋ৽(ͷ४උ)Λͤ͞Δͷ • CIͰఆظతʹճ͢͜ͱΛఆ • https://github.com/o0h/composer-update- request
Slide 18
Slide 18 text
ػೳ • ߋ৽ΛνΣοΫ͠ɺ composer.lockʹ͕ࠩ͋ΕPRΛଧͭ • ϥΠϒϥϦͷมߋ༰(version change)Λهड़ • PRςϯϓϨʔτ • ࢦఆ͓͍ͯͨ͠ΞΧϯτͷΞαΠϯ
Slide 19
Slide 19 text
Έ • Composer Pluginͱͯ͠࡞ಈ • (CI্Ͱ)ఆظతʹ `composer update` ΛࠐΜͰ͓͘ • PRE_UPDATE_CMD / POST_UPDATE_CMDʹhook • updateલޙͰ composer.lockʹࠩҟ͕͋ΕPRΛ࡞
Slide 20
Slide 20 text
͜Μͳײ͡ͷهड़Λ͓ͯ͘͠ => ࣗಈతʹPR͕ಧ͘ʂ ※.travis.yml
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
ߋ৽͞Εͨ༰ͱґଘؔ ҙͷPRςϯϓϨʔτ (ಈ࡞֬ೝ߲ɺखॱΛهड़͢Δఆ)
Slide 23
Slide 23 text
ͱ͍͑ɺͪΐ͍ͪΐ͍໘͍͘͞ • ΕΔ͠ • ಈ࡞֬ೝͱΒͳ͍ͱͩ͠ • ࡞ۀऀʹΑͬͯ֬ೝͷ༰ҧ͍ͦ͏ͩ͠ɻ • खॱॻ࡞Δɾɾʁ • composer.lockͷdiffΈʹ͍͘͠
Slide 24
Slide 24 text
ͱ͍͑ɺͪΐ͍ͪΐ͍໘͍͘͞ ׂͱվળͰ͖ͦ͏ʂ • ΕΔ͠ • ಈ࡞֬ೝͱΒͳ͍ͱ ͩ͠ • composer.lockͷdiff Έʹ͍͘͠ ➡ উखʹདྷΔ ➡ νΣοΫ߲ΛPRʹ ఴͰ͖Δ ➡ ύοτݟͰ͔ΔΑ ͏ͳࠩͷهड़
Slide 25
Slide 25 text
ײ && ͬͯΈͯྑ͔ͬͨࣄ • (લఏɺςετ͕͔ͬ͠Γॻ͔Ε͍ͯͳ͍ͱਏ͍) • ߋ৽Εͳ͘ͳͬͨ • ֬ೝ࡞ۀͷ༰ΛۉҰԽͰ͖ͨ • (ཷΊա͗ͳ͚Εɺ) ߋ৽ࠩΛ͏ͷͦ͜·Ͱखؒ͡Όͳ͍ • “࠷৽ιϑτͬͯ·͢”ͬͯࢥ͑Δͷͪΐͬͱָ͍͠
Slide 26
Slide 26 text
ࠓޙͷ༧ఆ • CircleCIରԠ͍ͨ͠ʂ • औΓࠐ·ΕͨόʔδϣϯͷreleasesͷURLΛష Γ͍ͨ • ςετ͕ͳ͍ɾɾɾɾɾɾɾɾɾɾ
Slide 27
Slide 27 text
ँࣙ:ࢮ͵΄Ͳࢀߟʹͨ͠ࢿྉ https://speakerdeck.com/hirak/phpcon2016
Slide 28
Slide 28 text
͓͖߹͍͍͖ͨͩ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ