From: Zachary Yedidia Date: Fri, 22 Jul 2022 00:46:23 +0000 (-0700) Subject: Fix info-plist script X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=490ee93796fede2dbb1e11b0b5b63e32e23217d9;p=micro.git Fix info-plist script --- 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 := `