Commit 015bf11a authored by Jacob Vosmaer's avatar Jacob Vosmaer

Better variable name

parent 0fba550d
image: "ruby:2.3"
before_script:
- export PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
- export PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
- apt update
- apt install rsync -y
- gem install --bindir /usr/local/bin bundler
......@@ -43,3 +43,12 @@ rspec:ruby2.1:
- ruby
except:
- tags
compile:
# Image taken from gitlab-ce@59f81b4ff8
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1"
script:
- go version
- which go
- bin/compile
......@@ -6,20 +6,20 @@ require 'fileutils'
require_relative '../lib/gitlab_init'
GO_DIR = 'go'
GOPATH = File.join(ROOT_PATH, 'go_build')
BUILD_DIR = File.join(ROOT_PATH, 'go_build')
GO_PACKAGE = File.join('gitlab.com/gitlab-org/gitlab-shell', GO_DIR)
def main
FileUtils.rm_rf(GOPATH)
build_source_dir = File.join(GOPATH, 'src', GO_PACKAGE)
FileUtils.rm_rf(BUILD_DIR)
build_source_dir = File.join(BUILD_DIR, 'src', GO_PACKAGE)
FileUtils.mkdir_p(build_source_dir)
FileUtils.cp_r(File.join(ROOT_PATH, GO_DIR, '.'), build_source_dir)
env = {
'GOPATH' => GOPATH,
'GOPATH' => BUILD_DIR,
'GO15VENDOREXPERIMENT' => '1',
}
run!(env, %W[go install #{GO_PACKAGE}/cmd/...])
executables = Dir[File.join(GOPATH, 'bin', '*')]
executables = Dir[File.join(BUILD_DIR, 'bin', '*')]
FileUtils.chmod(0755, executables)
FileUtils.cp(executables, File.join(ROOT_PATH, 'bin'))
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment