rayh / xcoder

ruby wrapper for Xcode build tools to aid automating builds
MIT License
412 stars 70 forks source link

Do not reinstall if profile is same and is already installed #65

Closed xslim closed 11 years ago

xslim commented 11 years ago

Sometimes I have a profile installed and I don't want to re-install it all the time. Example when using like this

# Buildspec
pprofile_id = '840823DD-B3CC-456A-8F1A-XXX'
pprofile = Xcode::ProvisioningProfile.find_installed_by_uuid(pprofile_id)
puts "Using PProfile: #{pprofile.name} in #{pprofile.path}"
pprofile_path = pprofile.path

group :build do
  use :MyProject, :scheme => :MyScheme
  profile pprofile_path
end
rayh commented 11 years ago

What's the issue in re-installing it? It just makes sure that the one in ~/Library is the most recent version. You will likely run into problems if you DONT install it when it changes as it will continue to use the previously installed one. There is a /slight/ overhead in copying it over, but I think it's negligible compared to the time it takes to run the build.

On 8 May 2013 20:16, Taras Kalapun notifications@github.com wrote:

Sometimes I have a profile installed and I don't want to re-install it all the time. Example when using like this

Buildspec

pprofile_id = '840823DD-B3CC-456A-8F1A-XXX' pprofile = Xcode::ProvisioningProfile.find_installed_by_uuid(pprofile_id) puts "Using PProfile: #{pprofile.name} in #{pprofile.path}" pprofile_path = pprofile.path

group :build do use :MyProject, :scheme => :MyScheme profile pprofile_path end


You can merge this Pull Request by running

git pull https://github.com/xslim/xcoder master

Or view, comment on, or merge it at:

https://github.com/rayh/xcoder/pull/65

Commit Summary

Do not reinstall if profile is same and is already installed

File Changes

M lib/xcode/provisioning_profile.rb (9)

Patch Links:

https://github.com/rayh/xcoder/pull/65.patch https://github.com/rayh/xcoder/pull/65.diff

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 | http://ray.sh

xslim commented 11 years ago

here I check that re-install is not needed if we are pointing to ~/Library… so there will no be race condition

rayh commented 11 years ago

I'm happy to take the other updates, but I'm still not sure why you need to check and avoid re-installing the profile. This makes the action a bit ambiguous (is it going to be installed?) and we will then also need to provide a mechanism for people to force install (when the profile changes, etc). I think it's much safe to assume the profile may have changed and re-install it. It's a cheap operation and removes the ambiguity.

xslim commented 11 years ago

What if I'm giving the path to the profile that is in Library folder where other profiles are installed, than the xcoder will just remove it and will not be able to install. A typical race condition. How would you prevent from this? That's why I did such check.

rayh commented 11 years ago

Right, ok, I see.

On 21 May 2013 16:55, Taras Kalapun notifications@github.com wrote:

What if I'm giving the path to the profile that is in Library folder where other profiles are installed, than the xcoder will just remove it and will not be able to install. A typical race condition. How would you prevent from this? That's why I did such check.

— Reply to this email directly or view it on GitHubhttps://github.com/rayh/xcoder/pull/65#issuecomment-18192149 .

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 | http://ray.sh

IvanUshakov commented 11 years ago

I think it's same, that i do in #63

xslim commented 11 years ago

oh, ok. didn't see you merged it. Well, you can close than this one )