summarylogtreecommitdiffstats
path: root/03-build_version_time.patch
diff options
context:
space:
mode:
Diffstat (limited to '03-build_version_time.patch')
-rw-r--r--03-build_version_time.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/03-build_version_time.patch b/03-build_version_time.patch
new file mode 100644
index 000000000000..e8445b515f0f
--- /dev/null
+++ b/03-build_version_time.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index 9ad158b..96393c4 100755
+--- a/Makefile
++++ b/Makefile
+@@ -4,6 +4,11 @@
+
+ SHELL = /bin/sh
+
++RR_VERSION = 1.9.1
++
++LDFLAGS += -X github.com/spiral/roadrunner/cmd/rr/cmd.Version=${RR_VERSION}
++LDFLAGS += -X github.com/spiral/roadrunner/cmd/rr/cmd.BuildTime=$(shell date +%FT%T%z)
++
+ .DEFAULT_GOAL := build
+
+ # This will output the help for each task. thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
+@@ -12,7 +17,7 @@ help: ## Show this help
+ @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
+
+ build: ## Build RR binary file for local os/arch
+- CGO_ENABLED=0 go build -trimpath -ldflags "-s" -o ./rr ./cmd/rr/main.go
++ CGO_ENABLED=0 go build -trimpath -ldflags "${LDFLAGS} -s" -o ./rr ./cmd/rr/main.go
+
+ clean: ## Make some clean
+ rm ./rr