summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-11-21 11:33:34 +0100
committerJacob Vosmaer <jacob@gitlab.com>2017-11-21 11:33:34 +0100
commit3332ae11d84bcf9a84d559a5d0bf4c4685874aad (patch)
tree5b85b7795dcaa50435d188cd5963fac92c3ee5fa
parent568a458b89d4b2ce60c295eaa45909695a4207b1 (diff)
downloadgitlab-ce-gitaly-ci-bundle.tar.gz
Maybe not using ruby helpsgitaly-ci-bundle
-rwxr-xr-xscripts/gitaly-test-build15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/gitaly-test-build b/scripts/gitaly-test-build
index 35a908da865..fa53cd60bf3 100755
--- a/scripts/gitaly-test-build
+++ b/scripts/gitaly-test-build
@@ -1,6 +1,4 @@
-#!/usr/bin/env ruby
-
-require 'fileutils'
+#!/bin/sh
# This script assumes tmp/tests/gitaly already contains the correct
# Gitaly version. We just have to compile it and run its 'bundle
@@ -9,11 +7,16 @@ require 'fileutils'
# called 'bundle install' using a different Gemfile, as happens with
# gitlab-ce and gitaly.
-dir = 'tmp/tests/gitaly'
+dir='tmp/tests/gitaly'
-abort 'gitaly build failed' unless system('make', 'BUNDLE_FLAGS=--no-deployment', chdir: dir)
+if ! (
+ cd "${dir}" && make BUNDLE_FLAGS=--no-deployment
+); then
+ echo 'gitaly build failed'
+ exit 1
+fi
# 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))
+touch -t 210001010000 "${dir}/gitaly"