Quellcode durchsuchen

replace GNU.make with Ruby.rake

tags/v0.9.0
jimzhan vor 9 Jahren
Ursprung
Commit
ea88839815
2 geänderte Dateien mit 34 neuen und 15 gelöschten Zeilen
  1. +0
    -15
      Makefile
  2. +34
    -0
      Rakefile

+ 0
- 15
Makefile Datei anzeigen

@@ -1,15 +0,0 @@
ARCH=$(shell ls $(GOPATH)/pkg | head -n 1)
PKG=$(GOPATH)/pkg/$(ARCH)/github.com/goanywhere

all: test
@echo $HOST

clean:
@find $(PKG) -name 'rex.a' -delete
@find $(PKG) -name 'rex' -type d -print0|xargs -0 rm -r

build:
@go get -v ./...

test: build
@go test -v ./...

+ 34
- 0
Rakefile Datei anzeigen

@@ -0,0 +1,34 @@
require 'pathname'
require 'fileutils'

OS=RbConfig::CONFIG["host_os"][0..5]
Package = File.join("#{ENV['GOPATH']}", "pkg", "*")


desc 'Remove previously built packages.'
task :clean do
Pathname.glob("#{Package}").map {|item|
if item.basename.to_s.start_with?(OS)
base = File.join(item.to_s, 'github.com', 'goanywhere')
# remove compiled rex sub-packages
if File.exists?(File.join(base, 'rex'))
FileUtils.rm_r File.join(base, 'rex'), :force => true
end
# remove compiled rex package
if File.exists?(File.join(base, 'rex.a'))
FileUtils.rm File.join(base, 'rex.a'), :force => true
end
end
}
end

desc 'Start building whole rex packages.'
task :build => :clean do
sh 'go get -v ./...'
end


desc 'Start testing rex packages...'
task 'test' do
sh 'go test -v ./...'
end

Laden…
Abbrechen
Speichern