Skip to content

Commit

Permalink
Merge c53b1bc into 3f57d64
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Nov 21, 2018
2 parents 3f57d64 + c53b1bc commit 878ccc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/dpl/provider/releases.rb
Expand Up @@ -147,7 +147,7 @@ def push_app
options[:tag_name] = get_tag.tap {|tag| log "Setting tag_name to #{tag}"}
end

unless options.key?(:target_commitish)
if same_repo? && !options.key?(:target_commitish)
options[:target_commitish] = sha.tap {|commitish| log "Setting target_commitish to #{commitish}"}
end

Expand All @@ -163,6 +163,10 @@ def upload_file(file, filename, release_url)
api.upload_asset(release_url, file, {:name => filename, :content_type => content_type})
end

def same_repo?
slug == context.env['TRAVIS_REPO_SLUG']
end

def booleanize!(opts)
opts.map do |k,v|
opts[k] = if BOOLEAN_PARAMS.include?(k.to_s.squeeze.downcase)
Expand Down

0 comments on commit 878ccc1

Please sign in to comment.