From 5a59665e3be8f7a06149a468cc143d72ddc91e74 Mon Sep 17 00:00:00 2001 From: dnitsch Date: Tue, 7 Feb 2023 10:18:19 +0000 Subject: [PATCH] fix: docs + minor tweaks in makefiles --- .github/workflows/pr.yml | 1 - Makefile | 5 ++--- pkg/generator/generator.go | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6763731..e10f92d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -62,4 +62,3 @@ jobs: # mandatory -Dsonar.projectVersion=$SEMVER -Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out - -X diff --git a/Makefile b/Makefile index cba3a39..1e95121 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ OWNER := dnitsch NAME := configmanager GIT_TAG := "1.18.0" VERSION := "v$(GIT_TAG)" -# VERSION := "$(shell git describe --tags --abbrev=0)" REVISION := $(shell git rev-parse --short HEAD) LDFLAGS := -ldflags="-s -w -X \"github.com/$(OWNER)/$(NAME)/cmd/configmanager.Version=$(VERSION)\" -X \"github.com/$(OWNER)/$(NAME)/cmd/configmanager.Revision=$(REVISION)\" -extldflags -static" @@ -37,12 +36,12 @@ clean: cross-build: for os in darwin linux windows; do \ - GOOS=$$os CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o dist/$(NAME)-$$os ./cmd; \ + GOOS=$$os CGO_ENABLED=0 go build -mod=readonly -buildvcs=false $(LDFLAGS) -o dist/$(NAME)-$$os ./cmd; \ done build-mac: for os in darwin; do \ - GOOS=$$os CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o dist/$(NAME)-$$os ./cmd; \ + GOOS=$$os CGO_ENABLED=0 go build -mod=readonly -buildvcs=false $(LDFLAGS) -o dist/$(NAME)-$$os ./cmd; \ done release: diff --git a/pkg/generator/generator.go b/pkg/generator/generator.go index fd4b840..7338783 100644 --- a/pkg/generator/generator.go +++ b/pkg/generator/generator.go @@ -332,7 +332,7 @@ func (c *GenVars) FlushToFile(w io.Writer, out []string) error { return c.flushToFile(w, listToString(c.outString)) } -// StrToFile +// StrToFile writes a provided string to the writer func (c *GenVars) StrToFile(w io.Writer, str string) error { return c.flushToFile(w, str) }