瀏覽代碼

add build tasks

tags/v0.9.0
jimzhan 9 年之前
父節點
當前提交
aada13fa36
共有 5 個文件被更改,包括 34 次插入9 次删除
  1. +29
    -0
      .gitignore
  2. +3
    -8
      Makefile
  3. 二進制
      cmd/rex/rex
  4. +2
    -0
      cmd/rex/run.go
  5. +0
    -1
      wercker.yml

+ 29
- 0
.gitignore 查看文件

@@ -0,0 +1,29 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
cmd/rex/rex

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

.env
*.exe
*.test
*.prof

gh-pages
gh-pages/*

+ 3
- 8
Makefile 查看文件

@@ -2,19 +2,14 @@

GOFLAGS ?= $(GOFLAGS:)

all: install test
all: test build

build:
@go build $(GOFLAGS) ./...
@go get -v ./...

install:
@go get $(GOFLAGS) ./...

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

bench: install
@go test -run=NONE -bench=. $(GOFLAGS) ./...

clean:
@go clean $(GOFLAGS) -i ./...

二進制
cmd/rex/rex 查看文件


+ 2
- 0
cmd/rex/run.go 查看文件

@@ -36,6 +36,7 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"

"github.com/goanywhere/rex"
"github.com/goanywhere/rex/internal"
"github.com/goanywhere/rex/livereload"

@@ -156,6 +157,7 @@ func Run(ctx *cli.Context) {
app := new(app)
app.dir = cwd
app.binary = filepath.Join(os.TempDir(), "rex-bin")
rex.Infof("App: %s", app.binary)
if runtime.GOOS == "windows" {
app.binary += ".exe"
}

+ 0
- 1
wercker.yml 查看文件

@@ -1 +0,0 @@
box: wercker/golang@1.4.2

Loading…
取消
儲存