Skip to content

Commit

Permalink
use the latest HEAD/master of the official SwiftLint repo as 'master'
Browse files Browse the repository at this point in the history
otherwise, if forks have an out-of-date `master` branch, OSSCheck will be
wildly inaccurate.
  • Loading branch information
jpsim committed Jul 13, 2017
1 parent cdd4bdd commit 2bd8664
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/oss-check
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def diff_and_report_changes_to_danger
end
end

def fetch_origin
`git fetch origin`
end

def clean_up
FileUtils.rm_rf(@working_dir)
perform('git worktree prune')
Expand Down Expand Up @@ -267,8 +271,9 @@ $stdout.sync = true
validate_state_to_run
setup_repos
make_directory_structure
fetch_origin

@effective_master_commitish = `git merge-base master #{@options[:branch]}`
@effective_master_commitish = `git merge-base origin/master #{@options[:branch]}`

# Build & generate reports for branch & master
%w[branch master].each do |branch|
Expand Down

0 comments on commit 2bd8664

Please sign in to comment.