From 4f72e317fc776a7726ae645df6c9cb07ca1fe81d Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Sat, 13 Mar 2021 04:34:24 +0200 Subject: [PATCH] embed version into local install and local run as well --- Makefile | 7 +++++-- README.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 566a1e8..09c12e5 100644 --- a/Makefile +++ b/Makefile @@ -60,9 +60,12 @@ fmt: go fmt ./... run: - go run . + go run $(LDFLAGS) . -.PHONY: clean all native fmt \ +install: + go install $(BUILDOPTS) $(LDFLAGS) . + +.PHONY: clean all native fmt install \ bin-native \ bin-linux-amd64 \ bin-linux-386 \ diff --git a/README.md b/README.md index 5c9dbb7..83f3ab9 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Pre-built binaries available on [releases](https://github.com/Snawoot/hola-proxy Alternatively, you may install hola-proxy from source. Run within source directory ``` -go install +make install ``` #### Docker