Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #134 from mrniket/master
Browse files Browse the repository at this point in the history
Fix for issue #115, 'Generated archive is invalid'
  • Loading branch information
KrauseFx committed Oct 29, 2015
2 parents 749b20f + 25813b6 commit 2f07326
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/gym/generators/build_command_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def archive_path
file_name = [Gym.config[:output_name], Time.now.strftime("%F %H.%M.%S")] # e.g. 2015-08-07 14.49.12
Gym.cache[:archive_path] = File.join(build_path, file_name.join(" ") + ".xcarchive")
end
if File.extname(Gym.cache[:archive_path]) != ".xcarchive"
Gym.cache[:archive_path] += ".xcarchive"
end
return Gym.cache[:archive_path]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/gym/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def build_app
# Makes sure the archive is there and valid
def verify_archive
# from https://github.com/fastlane/gym/issues/115
if (Dir[BuildCommandGenerator.archive_path + "/*"] + Dir[BuildCommandGenerator.archive_path + ".xcarchive/*"]).count == 0
if (Dir[BuildCommandGenerator.archive_path + "/*"]).count == 0
ErrorHandler.handle_empty_archive
end
end
Expand Down

0 comments on commit 2f07326

Please sign in to comment.