Skip to content

Commit

Permalink
Do not futz with framework versions during deployment [GH-101]
Browse files Browse the repository at this point in the history
We are receiving reports that apps are being rejected from the app store
now because of the file organization of MacRuby.framework when embedded
into applications.

Simply retaining the original version number and referring to the
Current symlink may fix things, but if it doesn't then we'll have a lot
more work to do...
  • Loading branch information
ferrous26 committed Jun 7, 2012
1 parent ff86331 commit ba873fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions bin/ruby_deploy
Expand Up @@ -215,12 +215,6 @@ class Deployer
rm_rf(app_macruby)
rsync('-rl', *exclude_dirs, @macruby_framework_path, app_frameworks)

# Rename the current version folder to Current in the MacRuby.framework
# copy when the AppStore validation gets an Info.plist in a symlinked
# folder it thinks it is a seperate target.
rm_rf(File.join(app_macruby, 'Versions', 'Current'))
mv(File.join(app_macruby, 'Versions', @macruby_install_version), File.join(app_macruby, 'Versions', 'Current'))

# Orphaned symlinks prevent AppStore validation.
rm_rf(File.join(app_macruby, 'Headers'))
rm_rf(File.join(app_macruby, 'Versions', 'Current', 'Headers'))
Expand Down
7 changes: 4 additions & 3 deletions spec/macruby/command_line/ruby_deploy_spec.rb
Expand Up @@ -203,14 +203,15 @@ def framework_stdlib
File.exists?(File.join(framework, 'Current/usr/lib/libmacruby.1.9.2.dylib'))
end

it 'only copies the Current version which is not a symlink' do
it 'keeps the correct version and Current symlink' do
cached_deploy('--embed')

dirs = Dir.entries(framework) - ['.','..']
dirs.count.should == 1
dirs.count.should == 2
dirs.should include('Current')
dirs.should include(MACRUBY_VERSION)

File.symlink?(File.join(framework, 'Current')).should be_false
File.readlink(File.join(framework, 'Current')).should == MACRUBY_VERSION

info = load_plist(IO.read(File.join(framework_resources, 'Info.plist')))
info['CFBundleShortVersionString'].should == MACRUBY_VERSION
Expand Down

0 comments on commit ba873fb

Please sign in to comment.