Browse Source

Add Makefile target for current OS and architecture

Frédéric Guillot 6 months ago
parent
commit
b51e7ea448
2 changed files with 6 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 5 1
      Makefile

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 miniflux-*
+miniflux

+ 5 - 1
Makefile

@@ -6,6 +6,7 @@ PKG_LIST := $(shell go list ./... | grep -v /vendor/)
 DB_URL := postgres://postgres:postgres@localhost/miniflux_test?sslmode=disable
 
 .PHONY: generate
+.PHONY: miniflux
 .PHONY: linux-amd64
 .PHONY: linux-armv8
 .PHONY: linux-armv7
@@ -20,6 +21,9 @@ DB_URL := postgres://postgres:postgres@localhost/miniflux_test?sslmode=disable
 generate:
 	@ go generate
 
+miniflux: generate
+	@ go build -mod=vendor -ldflags=$(LD_FLAGS) -o $(APP) main.go
+
 linux-amd64: generate
 	@ GOOS=linux GOARCH=amd64 go build -mod=vendor -ldflags=$(LD_FLAGS) -o $(APP)-linux-amd64 main.go
 
@@ -53,7 +57,7 @@ run: generate
 	@ go run main.go -debug
 
 clean:
-	@ rm -f $(APP)-*
+	@ rm -f $(APP)-* $(APP)
 
 test:
 	go test -cover -race -count=1 ./...