2017-07-31 09:17:14 -04:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
2017-08-03 06:15:08 -04:00
|
|
|
require 'fileutils'
|
|
|
|
|
2017-07-31 09:17:14 -04:00
|
|
|
# This script assumes tmp/tests/gitaly already contains the correct
|
|
|
|
# Gitaly version. We just have to compile it and run its 'bundle
|
|
|
|
# install'. We have this separate script for that because weird things
|
|
|
|
# were happening in CI when we have a 'bundle exec' process that later
|
|
|
|
# called 'bundle install' using a different Gemfile, as happens with
|
|
|
|
# gitlab-ce and gitaly.
|
|
|
|
|
2017-08-03 06:15:08 -04:00
|
|
|
dir = 'tmp/tests/gitaly'
|
|
|
|
|
|
|
|
abort 'gitaly build failed' unless system('make', chdir: dir)
|
|
|
|
|
|
|
|
# Make the 'gitaly' executable look newer than 'GITALY_SERVER_VERSION'.
|
|
|
|
# Without this a gitaly executable created in the setup-test-env job
|
|
|
|
# will look stale compared to GITALY_SERVER_VERSION.
|
|
|
|
FileUtils.touch(File.join(dir, 'gitaly'), mtime: Time.now + (1 << 24))
|