Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	yolo.gemspec
  • Loading branch information
alexfish committed Nov 8, 2013
2 parents 2f4a5c9 + 1c8da7d commit 36a7cb3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
10 changes: 10 additions & 0 deletions lib/yolo/formatters/error_formatter.rb
Expand Up @@ -82,10 +82,20 @@ def missing_email_details
puts red("Can't send mail notification, missing details")
end

#
# Outputs a red string stating that the github token is missing in config
#
def no_github_token
puts red("No Github token found, please specify one in ~/.yolo/config.yml ")
end

#
# Outputs a red string stating that there was a problem creating a github release
#
def no_github_release
puts red("There was a problem creating the release, maybe the tag already exists")
end

#
# Outputs a red string stating that a release notes file could not be found
# @param notes [String] The path which should contain a notes file
Expand Down
12 changes: 8 additions & 4 deletions lib/yolo/tools/github.rb
Expand Up @@ -52,10 +52,14 @@ def release(bundle, version, body)
response = http.request(request)
response = JSON.parse(response.body)

@progress.created_release(version)

url = response["upload_url"].gsub("{?name}","")
upload_bundle(bundle, url, "#{version}.zip")
if response.has_key?("upload_url")
@progress.created_release(version)
url = response["upload_url"].gsub("{?name}","")
upload_bundle(bundle, url, "#{version}.zip")
else
error = Yolo::Formatters::ErrorFormatter.new
error.no_github_release
end
end

# Upload the bundle to the github release url
Expand Down
6 changes: 3 additions & 3 deletions yolo.gemspec
@@ -1,18 +1,18 @@
Gem::Specification.new do |s|
s.name = 'yolo'
s.version = '1.3.1'
s.version = '1.3.2'
s.date = Date.today.to_s
s.executables << 'yolo'
s.summary = "YOLO!"
s.description = "yolo is a RubyGem which provides a Ruby interface to Continuous Integration build tools. yolo is currently geared towards the Xcode toolchain and iOS development."
s.authors = ["Alex Fish"]
s.email = 'alex@alexefish.com'
s.license = 'MIT'
s.files = Dir['Rakefile', '{bin,lib,test,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z`.split("\0")
s.homepage = 'http://rubygems.org/gems/yolo'
s.add_runtime_dependency "xcodebuild-rb", ["= 0.2.0"]
s.add_runtime_dependency "ocunit2junit", ["= 1.2"]
s.add_runtime_dependency "calabash-cucumber"
s.add_runtime_dependency "redcarpet"
s.license = 'MIT'
s.add_runtime_dependency "rubyzip", ["= 1.1.0"]
s.add_runtime_dependency "rubyzip", [">= 1.0.0"]
end

0 comments on commit 36a7cb3

Please sign in to comment.