Skip to content

Commit

Permalink
generate:
Browse files Browse the repository at this point in the history
Signed-off-by: Nasfame <laciferin@gmail.com>

Took 8 minutes
  • Loading branch information
Nasfame committed Nov 28, 2023
1 parent ec3fc88 commit 27abaed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
release:
go build -v -ldflags="-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)" .
./lilypad version
11 changes: 8 additions & 3 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

package main

//go:generate echo "go build -ldflags=\"-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)\" ." | tee /dev/tty | sh
//go:generate make release
//go:generate ./lilypad -v

/*
go:generate echo "go build -v -ldflags=\"-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)\" ." | tee /dev/tty | sh
go:generate go build -ldflags="-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)"
//go:generate ./lilypad -v
//go:generate echo 'go build -v -ldflags=\"-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)\" .' | tee | sh
go:generate go build -ldflags="-X lilypad.VERSION=$(git describe --tags --abbrev=0) -X lilypad.COMMIT_SHA=$(git rev-parse HEAD)"
FIXME:: not working cuz of issue: https://stackoverflow.com/questions/28558110/go-generate-escape-characters
*/

0 comments on commit 27abaed

Please sign in to comment.