pull/49/head
Hunter Long 2018-08-17 08:03:46 -07:00
parent 83ce791d01
commit 3510569ba1
5 changed files with 7 additions and 9 deletions

View File

@ -69,7 +69,6 @@ script:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then make coverage; fi
after_success:
- make travis-crypress
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then travis_wait 30 docker pull karalabe/xgo-latest; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then make release; fi

View File

@ -18,7 +18,7 @@ all: dev-deps compile install test-all
release: dev-deps build-all compress
test-all: dev-deps test docker-test cypress-test coverage
test-all: dev-deps test cypress-test coverage
travis-test: dev-deps cypress-install test docker-test cypress-test coverage
@ -37,7 +37,7 @@ compile:
sass source/scss/base.scss source/css/base.css
test: clean compile install
STATUP_DIR=`pwd` GO_ENV=test && go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./...
STATUP_DIR=$(TEST_DIR) go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./...
gocov convert coverage.out > coverage.json
coverage:
@ -72,7 +72,7 @@ docker-run: docker
docker-dev:
docker build -t hunterlong/statup:dev -f ./.dev/Dockerfile .
docker-run-dev: docker-dev
docker-run-dev: clean docker-dev
docker run -t -p 8080:8080 hunterlong/statup:dev
docker-test: docker-dev
@ -99,7 +99,7 @@ dev-deps:
$(GOCMD) get github.com/davecheney/godoc2md
$(GOCMD) install github.com/davecheney/godoc2md
$(GOCMD) get github.com/axw/gocov/gocov
$(GOCMD) get -u gopkg.in/matm/v1/gocov-html
$(GOCMD) get gopkg.in/matm/v1/gocov-html
$(GOCMD) install gopkg.in/matm/v1/gocov-html
$(GOCMD) get github.com/mgechev/revive
@ -152,4 +152,4 @@ cypress-install:
cypress-test: clean cypress-install
cd .dev/test && npm test
.PHONY: build build-all build-alpine
.PHONY: build build-all build-alpine test-all test

View File

@ -49,7 +49,6 @@ func TestExportCommand(t *testing.T) {
}
func TestAssetsCommand(t *testing.T) {
t.SkipNow()
c := testcli.Command("statup", "assets")
c.Run()
t.Log(c.Stdout())
@ -65,6 +64,7 @@ func TestVersionCLI(t *testing.T) {
}
func TestAssetsCLI(t *testing.T) {
t.SkipNow()
run := CatchCLI([]string{"statup", "assets"})
assert.EqualError(t, run, "end")
assert.FileExists(t, dir+"/assets/css/base.css")

View File

@ -55,6 +55,7 @@ func parseFlags() {
func main() {
var err error
parseFlags()
utils.InitLogs()
if len(os.Args) >= 2 {
err := CatchCLI(os.Args)

View File

@ -97,7 +97,6 @@ func CompileSASS(folder string) error {
func UsingAssets(folder string) bool {
if _, err := os.Stat(folder + "/assets"); err == nil {
utils.Log(1, "Assets folder was found!")
return true
} else {
if os.Getenv("USE_ASSETS") == "true" {
@ -111,7 +110,6 @@ func UsingAssets(folder string) bool {
}
return true
}
utils.Log(1, "Not using local assets in: "+folder+"/assets")
}
return false
}