ios - Optimizing workflow to update internally owned cocoapods dependencies? -
let's have main project a
several cocoapods dependencies (which internally owned our organization's cocoapods repo).
let's i'm working on project a
, , while working on find fix on dependencyb
, modify code in dependency while still being on projecta's xcode project.
what best workflow push changes on dependency it's own repository , updating dependency in project a
?
i ways avoid, completely automate or simplify following workflow (which pita)
worflow avoid
git clone git@github.com:organization/dependencyb.git
make changes in dependency project (the same changes made while fixing issue found while working on
project a
)update
dependencyb.podspec
files.version = "0.1.7" s.source = { :git => "https://github.com/organization/dependencyb.git", :tag => "0.1.7" }
commit & tag dependency's version
git add -a git commit -m 'made changes' git tag -a 0.1.7 -m 'this awesome tag :d' git push origin master git push --tags origin
update organiazation's private cocoapods repo (which stored in
~/
)cd ~/.cocoapods/organizationprivaterepo/coverflux mkdir 0.1.7 cd 0.1.7
copy updated dependencyb.podspec organiation's private repo (cloned in
~/.cocoapods
)~/.cocoapods/organizationprivaterepo/dependencyb/0.1.7/coverflux.podspec
commit changes in private repository & push remote
cd ~/.cocoapods/organizationprivaterepo/ git commit -am 'added version 0.1.7 dependencyb spec' git push origin master
finally proceed initial's 'project a' folder , update
pod update
note:
project's podfile looks like:
platform :ios, '6.0' pod 'dependencyb'
here tips simplify workflow. beyond these, might need consider making additional scripts.
first, recommend keep podspec file located @ root of project. so, dependencyb.git have file dependencyb.podspec.
simplify step 3
change source tag reference version. way, need change version line in podspec.
s.source = { :git => "https://github.com/organization/dependencyb.git", :tag => "#{s.version}" }
simplify steps 5, 6, , 7
run following dependencyb.git directory. (assuming have podspec there suggested above)
pod push organizationprivaterepo dependencyb.podspec
if dependencyb.podspec podspec file, don't need include on line, yielding:
pod push organizationprivaterepo
step 4
finally, think simplifying step 4 possible, 1 of things varies between organizations , individual developers part of workflow. example, commit ide.
such scripts integrated podspec update s.version
value. or alternatively, correct tag s.version
value.
update: simplify step 2
it looks making change twice dependencyb. can have cocoapods setup symbolic link. in projecta's podfile, set following:
pod 'dependencyb', :path => "../path/to/dependencyb'
you can edit files in dependencyb projecta. need run pod update
after making change. after that, changes source available since symbolic link. have had trouble making git commits xcode when doing this, other works well.
Comments
Post a Comment