mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
shuffle makefile & add empty go.mod
go 1.16 requires go.mod in git folders now apparently
This commit is contained in:
parent
8a7a542b22
commit
e2aa4f149e
3 changed files with 24 additions and 13 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -5,6 +5,7 @@ gossa-linux-arm64
|
|||
gossa-mac
|
||||
gossa-windows.exe
|
||||
gossa_test.go
|
||||
build-all
|
||||
|
||||
.vscode
|
||||
test-fixture/*
|
||||
|
|
@ -39,4 +40,4 @@ test-fixture/*/*
|
|||
!test-fixture/fancy-path
|
||||
!test-fixture/fancy-path/*
|
||||
!test-fixture/ext/*
|
||||
!test-fixture/ext
|
||||
!test-fixture/ext
|
||||
|
|
|
|||
31
Makefile
31
Makefile
|
|
@ -1,8 +1,11 @@
|
|||
FLAGS := -ldflags "-s -w"
|
||||
NOCGO := CGO_ENABLED=0
|
||||
|
||||
build:
|
||||
cp src/gossa.go gossa.go
|
||||
make -C gossa-ui/
|
||||
go vet && go fmt
|
||||
CGO_ENABLED=0 go build -ldflags "-s -w" -o gossa
|
||||
${NOCGO} go build ${FLAGS} -o gossa
|
||||
rm gossa.go
|
||||
|
||||
install:
|
||||
|
|
@ -19,18 +22,22 @@ run-extra:
|
|||
|
||||
test:
|
||||
make build
|
||||
-rm gossa_test.go
|
||||
-@cd test-fixture && ln -s ../support .
|
||||
rm -rf gossa_test.go
|
||||
-@cd test-fixture && ln -s ../support .; true
|
||||
cp src/gossa_test.go .
|
||||
-@killall gossa
|
||||
make run &
|
||||
|
||||
-@killall gossa; true
|
||||
-make run &
|
||||
go test -run TestNormal
|
||||
|
||||
killall gossa
|
||||
make run-extra &
|
||||
-make run-extra &
|
||||
go test -run TestExtra
|
||||
|
||||
killall gossa
|
||||
make run-ro &
|
||||
-make run-ro &
|
||||
go test -run TestRo
|
||||
|
||||
killall gossa
|
||||
|
||||
watch:
|
||||
|
|
@ -48,11 +55,11 @@ watch-test:
|
|||
build-all:
|
||||
cp src/gossa.go gossa.go
|
||||
make -C gossa-ui/
|
||||
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o gossa-linux64
|
||||
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-s -w" -o gossa-linux-arm
|
||||
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o gossa-linux-arm64
|
||||
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o gossa-mac
|
||||
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o gossa-windows.exe
|
||||
${NOCGO} GOOS=linux GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-linux64
|
||||
${NOCGO} GOOS=linux GOARCH=arm go build ${FLAGS} -o build-all/gossa-linux-arm
|
||||
${NOCGO} GOOS=linux GOARCH=arm64 go build ${FLAGS} -o build-all/gossa-linux-arm64
|
||||
${NOCGO} GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-mac
|
||||
${NOCGO} GOOS=windows GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-windows.exe
|
||||
rm gossa.go
|
||||
|
||||
clean:
|
||||
|
|
|
|||
3
go.mod
Normal file
3
go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module github.com/pldubouilh/gossa
|
||||
|
||||
go 1.16
|
||||
Loading…
Reference in a new issue