Skip to content

Commit

Permalink
Use printf for generating version.go (#933)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
starsep authored Oct 31, 2024
1 parent 687f9ab commit dd6b40c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions desktop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd6b40c

Please sign in to comment.