We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 290ecda commit 01398e1Copy full SHA for 01398e1
build-linux-docker.rb
@@ -0,0 +1,17 @@
1
+#!env ruby
2
+
3
+match = File.read('main.go').match(/Version.*(\d+\.\d+\.\d+)/)
4
+version = match[1]
5
+if !version
6
+ puts 'Version not found.'
7
+ exit 1
8
+end
9
10
+target = "runx-linux-x64-#{version}"
11
+system('docker build -t runx .')
12
+system('docker run -it runx')
13
+id = `docker ps -l -q`.strip
14
+system("docker cp #{id}:/src/runx ./#{target}")
15
+system("docker rm #{id}")
16
+system("docker run -it --rm -v #{Dir.pwd}/#{target}:/bin/runx golang:1-wheezy bash")
17
+system("docker rmi runx:latest")
build-linux-docker.sh
0 commit comments