From dd6b40c9435e4dc99cff216a9158a15153907165 Mon Sep 17 00:00:00 2001 From: Filip Czaplicki Date: Thu, 31 Oct 2024 20:07:24 +0100 Subject: [PATCH] Use printf for generating version.go (#933) Flag -e is to "enable interpretation of backslash escapes" Which might be a default, depends on a shell. `sh -c 'echo "a\nb"'` on my OS prints > a\nb (no newline) ## Launch Checklist - [x] Briefly describe the changes in this PR. --- desktop/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/Makefile b/desktop/Makefile index 85d30c8c..9ac28eec 100644 --- a/desktop/Makefile +++ b/desktop/Makefile @@ -32,9 +32,9 @@ $(GOBIN)/rice: # Embed the current version number in the executable by writing version.go .PHONY: version.go version.go: - @echo "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go - @echo "package main\n" >> version.go - @echo "const Version = \"$(VERSION)\"" >> version.go + @printf "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go + @printf "package main\n" >> version.go + @printf "const Version = \"$(VERSION)\"\n" >> version.go rice-box.go: $(GOBIN)/rice editor/pull_release $(GOBIN)/rice embed-go