Skip to content

Commit

Permalink
Fix for issue fastlane-old#115, 'Generated archive is invalid'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrniket committed Oct 29, 2015
1 parent 749b20f commit 25813b6
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 25813b6

Please sign in to comment.