Upgrade to Pro — share decks privately, control downloads, hide ads and more …

agvtoolで超かっこよくバージョニングできますか?

 agvtoolで超かっこよくバージョニングできますか?

agvtoolとかBuild SettingsのVersionigという項目のお話

0d04162c7a3c2907c059a06dbcd23cf4?s=128

tokorom

May 15, 2014
Tweet

Transcript

  1. agvtool Ͱ ௒͔ͬ͜Α͘ όʔδϣχϯάͰ͖·͔͢ʁ ॴ ༑ଠ @tokorom iOS App Programer

    These are “not” confidential sessions—please diffuse by your blogging and twitter potatotips #7
  2. agvtoolͬͯʁ • ઌ೔ Cocoaͷ೔ʑ৘ใہ ͞ΜͰ঺հ͞Εͯͨ ΍ͭ •ϓϩδΣΫτͷόʔδϣϯΛ͍͍͔Μ͡ʹૢ࡞ Ͱ͖ΔίϚϯυ !

  3. BuidSettingsͷVersioningͬͯʁ • ΞϓϦͷVersionΛ͍͍͔Μ͡ʹઃఆ͢ΔͨΊ ͷઃఆ߲໨ •ઌ೔·Ͱશ͘஌Βͳ͔ͬͨͷ͕ͩੲ͔Β͋ͬͨͬ Ά͍ !

  4. Α͋͘ΔVersioning • PlistBuddyͱ͔Λ࢖ͬͯinfo.plistͷ஋Λநग़ɺ ্ॻ͖ͯ͠Ϗϧυ൪߸Λߋ৽͢Δ • Jenkinsͱ͔ͰΞϓϦΛArchive͢Δͱ͖ʹshell εΫϦϓτͰinfo.plistΛ͍͡Δʢಉ͘͡ PlistBuddyͱ͔Ͱʣ • info.plist

    Λ௚઀͍͡Δ͔͍͡Βͳ͍͔͕ࠓճ ͷΩʔϙΠϯτ
  5. agvtoolͷ΄͏͕͍͍ͷʁ • ஌Γ·ͤΜ • ͳͷͰࠓ೔ௐ΂͸͡Ί·ͨ͠ !

  6. $ agvtool new-marketing-version 1.0.1

  7. $ agvtool new-version 1.0.1

  8. $ agvtool new-version -all 1.0.1

  9. Current Project Versionͬͯʁ • info.plist ͷ΄͏ͷهड़͕ ${CURRENT_PROJECT_VERSION} ʹݻఆͰ͖Δ • PlistBuddyͰVersionig͢Δͱ͖ͷinfo.plistʹࠩ෼͕ग़Δͱ

    ͍͏໰୊͕ղফ͞ΕΔ͔΋ʁ !
  10. Current Project Versionͬͯʁ • Ͱ΋info.plistͷ୅ΘΓʹ *.pbxproj ͷ΄͏ʹࠩ෼ ͕ग़ΔΑ • Ͱ΋ɺBuild

    Settingsͷ΄͏ͳΒ info.plist ͱҧͬ ͯ xcconfig ͕࢖͑Δ • xcconfig ΛRun ScriptsͰॻ͖׵͑ͯͦͷxcconfig ΛgitignoreʹؚΊ͓͚ͯ͹͍͚ΔΜ͡Όͳ͍ʁ !
  11. ͨͩ͠ • ͜ͷVersioningͷઃఆͨ͠ޙʹXcodeͷRun͕ ෆ҆ఆʢ·ͩݪҼෆ໌ʣ • ·ͩPlistBuddyͱ͔ΑΓ࣮֬ʹྑ͍ͱ൑அ͸Ͱ ͖ͳ͍ • ࠓ೔ࢼ࢝͠Ί͚ͨͩͰ࣮༻Խ͍ͯ͠ͳ͍ͷͰ࣮ ༻ͯ͠Έͯͷॴײ͸ผ్ใࠂ

    !
  12. Build Settings/Versioning • ̍ͭ͜Εͷྑͦ͞͏ͳ࢖͍ํΛ঺հ • Build SettingsͳͷͰConfiguration͝ͱ ʢDebugͱ͔ReleaseʣʹઃఆΛมߋͰ͖Δ !

  13. Build Settings/Versioning

  14. Build Settings/Versioning DebugͰ࣮ߦͨ͠ͱ͖ ReleaseͰ࣮ߦͨ͠ͱ͖ ͞Β͹ #ifdef DEBUG

  15. ·ͱΊ • agvtool ͸Մೳੑ͋Δ͔΋ʁ • agvtool ͸ஔ͍͓͍ͯͯ΋ Versioning ͷઃఆ ߲໨͸ௐࠪ͢ΔՁ஋͕͋Γͦ͏

    • ଓ͖͸WebͰ !
  16. More Information Yuta ToKoRo! iOS App Programer! @tokorom! ! http://www.tokoro.me/