summaryrefslogtreecommitdiff
path: root/bin/compile
blob: f2065280752c140f7b922e9c6b4d8f01e79bad9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby

require 'fileutils'

require_relative '../support/go_build'
include GoBuild

def main
  ensure_build_dir_exists

  run!(GO_ENV, %W[go install ./cmd/...], chdir: GO_DIR)
  executables = Dir[File.join(BUILD_DIR, 'bin', '*')]
  FileUtils.chmod(0755, executables)
  FileUtils.cp(executables, File.join(ROOT_PATH, 'bin'))
end

main