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
iOS リポジトリへの Renovate の導入
Search
Kenta Enomoto
July 05, 2023
Technology
2
340
iOS リポジトリへの Renovate の導入
Ebisu.mobile #3 の発表資料です。
https://hey.connpass.com/event/286007/
Kenta Enomoto
July 05, 2023
Tweet
Share
More Decks by Kenta Enomoto
See All by Kenta Enomoto
STORES ブランドアプリのスケールするアプリづくり
enomotok
0
17
What's new in Xcode 16 ダイジェスト
enomotok
0
610
Introducing Pkl
enomotok
0
2.3k
iOS開発とGitLab CI
enomotok
7
4k
ポモドーロテクニックについて
enomotok
0
120
リーダブルコード読書会 #1
enomotok
0
290
Other Decks in Technology
See All in Technology
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.1k
Classmethod AI Talks(CATs) #15 司会進行スライド(2025.02.06) / classmethod-ai-talks-aka-cats_moderator-slides_vol15_2025-02-06
shinyaa31
0
170
自動テストの世界に、この5年間で起きたこと
autifyhq
10
7.1k
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
2
390
FastConnect の冗長性
ocise
1
9.6k
開発者が自律的に AWS Security Hub findings に 対応する仕組みと AWS re:Invent 2024 登壇体験談 / Developers autonomously report AWS Security Hub findings Corresponding mechanism and AWS re:Invent 2024 presentation experience
kaminashi
0
190
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.5k
Developers Summit 2025 浅野卓也(13-B-7 LegalOn Technologies)
legalontechnologies
PRO
0
150
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
480
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
120
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
Ask! NIKKEIの運用基盤と改善に向けた取り組み / NIKKEI TECH TALK #30
kaitomajima
1
450
Featured
See All Featured
Scaling GitHub
holman
459
140k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Adopting Sorbet at Scale
ufuk
74
9.2k
Speed Design
sergeychernyshev
25
780
Bash Introduction
62gerente
610
210k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
4 Signs Your Business is Dying
shpigford
182
22k
Transcript
2023-07-05 Ebisu.mobile #3 STORES 株式会社 榎本健太 iOS リポジトリへの Renovate の導入
自己紹介 2 榎本 健太 STORES 株式会社 STORES ブランドアプリチーム iOS エンジニア
2023年5月入社 twitter.com/enomotok_ github.com/enomoto
ライブラリの更新を自動化するモチベーション 3 • 機能追加 • バグフィックス • セキュリティリスクの低減 • ビッグリリースを避ける
とはいえ手作業で行うのは大変
Renovate とは 4 依存関係の自動更新をサポートするためのツール 依存しているライブラリのリリースを検知 アップデートのための Pull Request を自動で作って くれる
同様のサービスとして Dependabot がある https://github.com/apps/renovate
Renovate の導入方法 5 GitHub App をインストールするだけで簡単に導入で きる Swift Package Manager
CocoaPods regexManagers の設定が必要なケース Carthage XcodeGen でプロジェクトの構成管理をしている
Renovate の導入方法 6 [pull request] Configure Renovate
Renovate の導入方法 7 [pull request] Configure Renovate
renovate.json 8 { "$schema": "https://docs.Renovatebot.com/Renovate-schema.json", "extends": [ "config:base" ], "schedule":
[ "every weekend" # Pull Request を作成するタイミング ], "labels": [ "Renovate" # Pull Request に付与するラベル ], "packageRules": [ # ライブラリ毎に細かいルールを設定できる { "excludePackageNames": ["onevcat/Kingfisher"] # 更新対象から除外する } ] }
困ったこと、工夫したこと 9 • XcodeGen で構成管理しているプロジェクトでは regexManagers の設定 が必要 • Package.resolved
が更新されない問題
regexManagers とは 10 regexManagers では正規表現を使ってライブラリ名とバージョン番号をキャプ チャ renovate.json に設定を記載
regexManagers による、ライブラリ名とバージョン番号の検知 11 project.yml (抜粋) packages: Firebase: url: https://github.com/firebase/firebase-ios-sdk from:
8.0.0 renovate.json (抜粋) "regexManagers": [ { "fileMatch": [ "^project.yml$" ], "matchStrings": [ "url: https:\\/\\/github\\.com\/(?<depName>.*?)(\\.git)?\\s*from: (?<currentValue>.*?)\\s" ], "datasourceTemplate": "github-releases" } ]
Package.resolved が更新されない問題 12 PR が生成されるタイミングで差分をコミットするようにしている CI の途中で以下の Shell Script を呼び出す
#!/usr/bin/env bash set -eo pipefail # ここで依存解決をしているのは、ライブラリのリポジトリに含めているデモ用のプロジェクト xcodebuild -project "Appmaker-Demo/Appmaker-Demo.xcodeproj" -resolvePackageDependencies diff_result=$(git diff --name-only) if [[ "$diff_result" == *"Package.resolved"* ]]; then git ls-files | grep 'Package.resolved$' | xargs git add git commit -m "Update Package.resolved [skip ci]" # bitrise で使用しているスクリプトの抜粋なので bitrise の環境変数を参照します git push origin HEAD:$BITRISE_GIT_BRANCH fi
自分の環境で手軽に試す方法 13 チュートリアル README.md の通りにぽちぽちしていくだけで簡単に試せる https://github.com/Renovatebot/tutorial iOS のリポジトリで試したい GitHub で公開されているリポジトリを
fork して、自分で設定してみると よい https://github.com/pointfreeco/isowords とか
参考URL 14 https://docs.renovatebot.com/ https://speakerdeck.com/ikesyo/renovateniyoruiosraiburarifalsezi-dong- geng-xin https://qiita.com/_asa08_/items/b0be1453f70efb3b9c29 https://tech.dely.jp/entry/2020/12/04/102515
おわり 15 ありがとうございました