Skip to content

Commit c1381c6

Browse files
authored
Merge pull request #111 from bastelfreak/buildfoo
CI: Add support for checking PR branches
2 parents 803668c + 4015108 commit c1381c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tasks/build.rake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ namespace :vox do
125125

126126
libs_to_build_manually.each do |lib, config|
127127
puts "Checking out #{lib}"
128-
run_command("git clone -b #{config[:branch]} #{config[:repo]} #{deps_tmp}/#{lib}", silent: false, print_command: true)
128+
# to be able to checkout github refs, e.g. 66/merge, we need to do an explicit fetch
129+
# this allows us to test on branches from pull requests
130+
# we can probably switch to git clone --revision $ref $url in the future, but that requires a newer git. EL9 is too old
131+
run_command("git clone --no-checkout #{config[:repo]} #{deps_tmp}/#{lib}; cd #{deps_tmp}/#{lib}; git fetch origin #{config[:branch]}; git checkout FETCH_HEAD", silent: false, print_command: true)
129132
end
130133

131134
puts "Starting container"

0 commit comments

Comments
 (0)