~gjabell/mfn

3ada0f215dda00a49c1df0b5c2388a37561840c1 — Galen Abell 1 year, 10 days ago 0e59134
Add Makefile + better versioning
2 files changed, 27 insertions(+), 2 deletions(-)

A Makefile
M main.go
A Makefile => Makefile +25 -0
@@ 0,0 1,25 @@
.POSIX:

VERSION=0.2.2

GO?=go
GOFLAGS?=

GOSRC!=find . -name '*.go'
GOSRC+=go.mod go.sum

mfn: $(GOSRC)
	$(GO) build $(GOFLAGS) \
		-ldflags "-X main.Version=$(VERSION)" \
		-o $@

all: mfn

RM?=rm -f

clean:
	$(RM) mfn

.DEFAULT_GOAL := all

.PHONY: all mfn clean

M main.go => main.go +2 -2
@@ 13,7 13,7 @@ import (
	mf "miniflux.app/client"
)

var version = "0.2.2"
var Version string

type Mfn struct {
	conf      *Config


@@ 65,7 65,7 @@ func main() {
	}

	if *showVersion {
		fmt.Printf("mfn %s\n", version)
		fmt.Printf("mfn %s\n", Version)
		os.Exit(0)
	}