My Very Own CI-server
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

56 rader
1.5 KiB

DISTDIR=dist
RELEASEVERSION=$(shell echo $VERSION)
DEBUGVERSION=$(shell git rev-list -1 HEAD | cut -c 1-10 )
HASH=$(shell git rev-list -1 HEAD)
GOVERSION=$(shell go version)
DATE=$(shell date)
LDFLAGS=-s -w
LDGENERICFLAGS=-X 'mvoCI/core.BuildTime=$(DATE)' -X 'mvoCI/core.Compiler=$(GOVERSION)' -X 'mvoCI/core.GitHash=$(HASH)'
DEBUGLDVERSION=-X 'mvoCI/core.Version=dev-$(DEBUGVERSION)'
RELEASELDVERSION=-X 'mvoCI/core.Version=$(RELEASEVERSION)'
DEBUGLDFLAGS=$(LDFLAGS) $(DEBUGLDVERSION) $(LDGENERICFLAGS)
RELEASELDFLAGS=$(LDFLAGS) $(RELEASELDVERSION) $(LDGENERICFLAGS)
all:
go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go
debug:
go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go --debug
install:
go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go --install
mvobuild:
go build -gccgoflags "-pthread" -ldflags "$(DEBUGFLAGS)" main.go
mv main mvo
#-upx mvo
release:
go build -gccgoflags "-pthread" -ldflags "$(RELEASELDFLAGS)" main.go
mv main mvo
dist: mvobuild
rm -rf $(DISTDIR)
mkdir $(DISTDIR)
mv mvo $(DISTDIR)
cp -r views $(DISTDIR)
cp -r static $(DISTDIR)
clean:
-rm mvo
-rm -rf dist
dep:
go get github.com/jinzhu/gorm github.com/labstack/echo golang.org/x/crypto/bcrypt github.com/foolin/goview github.com/foolin/goview/supports/echoview-v4 github.com/dgrijalva/jwt-go github.com/denisenkom/go-mssqldb github.com/go-sql-driver/mysql github.com/lib/pq github.com/lib/pq/hstore github.com/mattn/go-sqlite3
doc:
godoc -http=localhost:6060
vet:
go vet
ctags:
ctags -R --language-force=go .