From 490ee93796fede2dbb1e11b0b5b63e32e23217d9 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Thu, 21 Jul 2022 17:46:23 -0700 Subject: [PATCH] Fix info-plist script --- Makefile | 2 +- tools/info-plist.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0034173a..fc9601aa 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ DATE = $(shell GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \ go run tools/build-date.go) ADDITIONAL_GO_LINKER_FLAGS = $(shell GOOS=$(shell go env GOHOSTOS) \ GOARCH=$(shell go env GOHOSTARCH) \ - go run tools/info-plist.go "$(GOOS)" "$(VERSION)") + go run tools/info-plist.go "$(shell go env GOOS)" "$(VERSION)") GOBIN ?= $(shell go env GOPATH)/bin GOVARS = -X github.com/zyedidia/micro/v2/internal/util.Version=$(VERSION) -X github.com/zyedidia/micro/v2/internal/util.CommitHash=$(HASH) -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=$(DATE)' DEBUGVAR = -X github.com/zyedidia/micro/v2/internal/util.Debug=ON diff --git a/tools/info-plist.go b/tools/info-plist.go index d57a7b24..22a1db0e 100644 --- a/tools/info-plist.go +++ b/tools/info-plist.go @@ -7,6 +7,7 @@ import ( "fmt" "io/ioutil" "os" + "runtime" ) func check(e error) { @@ -17,7 +18,7 @@ func check(e error) { func main() { if len(os.Args) == 3 { - if os.Args[1] == "darwin" { + if os.Args[1] == "darwin" && runtime.GOOS == "darwin" { rawInfoPlistString := ` -- 2.44.0