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

<!-- Thanks for the PR! Feel free to add or remove items from the
checklist. -->
 - [x] Briefly describe the changes in this PR.
This commit is contained in:
Filip Czaplicki
2024-10-31 20:07:24 +01:00
committed by GitHub
parent 687f9abaf2
commit dd6b40c943

View File

@@ -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