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
ドッグフーディング用機能開発のススメ
Search
fromkk
November 25, 2016
Technology
1
680
ドッグフーディング用機能開発のススメ
チームで開発してると自分の把握してない場所でバグが発生している事がある。そんな時に原因を探す為にアプリの中にGitのブランチを表示させたらどうかという提案です。
fromkk
November 25, 2016
Tweet
Share
More Decks by fromkk
See All by fromkk
note社の全員野球で品質向上活動について / note_qa_challenge #iOS_test_teatime
fromkk
3
1.8k
1年分のデータが見たいと言われてやったこと/yearly_data_with_note
fromkk
0
890
note iOSチームの自動化 ver.2021/automation_with_iOS_team_on_note_ver2021
fromkk
0
1.9k
Bitrise体験会説明資料/bitrise_explore
fromkk
1
1k
noteのiOSアプリで実装したアクセシビリティの全て #iosdc #a /a11y_with_iOS_App_on_note
fromkk
2
3.4k
dSYMのアップロードで SPMを活用する/use_spm_with_upload_dsyms
fromkk
1
2.6k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
520
note社でのMagic Pod活用事例 #af_iosdc/magicpod_with_note
fromkk
2
10k
iOSには無いmacOS独自機能をCatalystで実装する #iosdc #d/make_macos_apps_with_catalyst
fromkk
9
2k
Other Decks in Technology
See All in Technology
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
200
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
310
Taming you application's environments
salaboy
0
180
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
300
Engineer Career Talk
lycorp_recruit_jp
0
160
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
Featured
See All Featured
How GitHub (no longer) Works
holman
310
140k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
KATA
mclloyd
29
14k
How to Ace a Technical Interview
jacobian
276
23k
It's Worth the Effort
3n
183
27k
The Invisible Side of Design
smashingmag
298
50k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Building Applications with DynamoDB
mza
90
6.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Transcript
υοάϑʔσΟϯά༻ػ ೳ։ൃͷεεϝ shinagawa.swift #1 (C) fromkk. 2016 1
ࣗݾհ ২Ԭɹ࠸ Timers inc.ͷiOSΤϯδχΞ Twitter: @fromkk Github: fromkk (C) fromkk.
2016 2
એ Χοϓϧ͚ΞϓϦͷPairy ͱ Ո͚ࣸਅڞ༗ΞϓϦͷ Famm ΛӡӦ͍ͯ͠Δ Ͱ ΤϯδχΞΛืू ͍ͯ͠·͢ʂ ڵຯͷ͋Δํֻ͓͚ɺ͘͠
http://timers-inc.com/ ΑΓ͓͍߹ΘͤԼ͍͞ʂ (C) fromkk. 2016 3
ૣͰ͕͢ (C) fromkk. 2016 4
νʔϜͰ։ൃͯ͠Δͱ ͜Μͳࣄ͋Γ·ͤΜ͔ʁ (C) fromkk. 2016 5
͜Μͳࣄ͋Γ·ͤΜ͔ʁ • ࣾһʮ͜͜όάͬͯΔΜ͚ͩͲʯ • ʢϏϧυ൪߸͔Β͏ͷେม...ʣ • ʮ...֬ೝ͢Δ͔Βͪΐͬͱͬͯʯ • ʢΘ͔ΜͶʔΑɺ͜Ε୭ͷϏϧυͩΑ...!ʣ (C)
fromkk. 2016 6
ϒϥϯν໊͕͔Ε ୭͕ॻ͍ͨͷͳͷ͔͔Δͷʹʂ (C) fromkk. 2016 7
ʢ։ൃதͷʣ ΞϓϦͷதʹϒϥϯν໊ Λग़ͯ͠͠·͓͏ʂ (C) fromkk. 2016 8
खॱ • Xcodeʹ Branch.plist ͱ͍͏ϑΝΠϧΛ࡞ • Edit Scheme ʹҠಈ •
εΩʔϜΛ Shared ʹมߋ • Build -> Pre Actions ΛΫϦοΫ • ϏϧυλʔήοτΛ Provide build setting from *** ʹมߋ • Scheme/Build/Pre-actions/Run Script ʹ࣍ͷίʔυΛՃ ※ https://github.com/fromkk/GitBranchName ʹαϯϓϧΛΞοϓ͍ͯ͠·͢ʂ (C) fromkk. 2016 9
खॱ branch="master" if [ ! -z "${CIRCLE_BRANCH+x}" ]; then branch=$CIRCLE_BRANCH
elif [ ! -z "${TRAVIS_BRANCH+x}" ]; then branch=$TRAVIS_BRANCH elif [ ! -z "${BITRISE_GIT_BRANCH+x}" ]; then branch=$BITRISE_GIT_BRANCH else git_path=$(which git) if [ -e $git_path ]; then branch=$($git_path --git-dir=$PROJECT_DIR/.git rev-parse --abbrev-ref HEAD) fi fi plistName=$PROJECT_DIR/Branch plistPath=$plistName.plist if [ ! -e $plistPath ]; then touch $plistPath fi chmod u+wr,g+wr,o+r $plistPath defaults write $plistName "branch" $branch (C) fromkk. 2016 10
खॱ • Ϗϧυͯ͠ΈΔ • Branch.plist ʹݱࡏͷϒϥϯν໊͕ө͞Ε͍ͯΔࣄΛ֬ ೝ • ࣍ͷ༷ͳίʔυͰϒϥϯν໊Λऔಘͯ͠ը໘ʹදࣔ (C)
fromkk. 2016 11
खॱ struct Branch { private enum Constants { static let
defaultBranch: String = "master" static let plistFileName: String = "Branch" static let branchNameKey: String = "branch" } static var current: String { guard let path: String = Bundle.main.path(forResource: Constants.plistFileName, ofType: "plist") else { return Constants.defaultBranch } guard let plist: [String: String] = NSDictionary(contentsOfFile: path) as? [String: String] else { return Constants.defaultBranch } return plist[Constants.branchNameKey] ?? Constants.defaultBranch } } let branch: String = Branch.current (C) fromkk. 2016 12
Demo (C) fromkk. 2016 13
·ͱΊ • ࢪࡦ͕ଟ͍ͱݪҼ͕ࢄΒΔͷͰࠞཚͷݩ • ݪҼΛٻͯ͠ରԠ͢Δҝʹ൜ਓ୳͕͠ඞཁͳࣄ͋Δ • ։ൃதͷෆ۩߹ϒϥϯν໊͕͔Δͱ৭ʑḿΔʂ • ෆໟͳݪҼ୳͜͠ΕͰΦαϥόʂ (C)
fromkk. 2016 14
͍ͬͯ͏༰ͰiOS Advent Calendar 2016ʹهࣄΛॻ͘ͷͰ ετοΫ ͍͍Ͷ Լ͍͞ʂ (C) fromkk. 2016
15
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ (C) fromkk. 2016 16