summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-05 17:14:36 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit6f7e32b6d9dcf4732dd0acbd89be77b42805a5ca (patch)
treecb979e90385493ceb16ca32e596ea2aa7a860db3 /exports
parent88244b18d28d4af37bfb3284ddcda7cc93c50dde (diff)
Exports Make: Get version from internal version
Diffstat (limited to 'exports')
-rw-r--r--exports/common.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/exports/common.mk b/exports/common.mk
index cb649ad..646c9c1 100644
--- a/exports/common.mk
+++ b/exports/common.mk
@@ -18,8 +18,11 @@ LIB_PREFIX ?= lib
LIB_SUFFIX ?= .so
endif
+# Get relative exports/ directory when included from a wrapper, without trailing slash
+override EXPORTS_PATH = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+
# Current version
-VERSION = 2.0.0
+VERSION := $(shell grep -o 'const Version = "[^"]*' "${EXPORTS_PATH}"/../internal/version/version.go | cut -d '"' -f 2)
# Library name without prefixes/suffixes
LIB_NAME ?= eduvpn_common
@@ -27,9 +30,6 @@ LIB_NAME_VERSION ?= $(LIB_NAME)-$(VERSION)
# Library file name
LIB_FILE ?= $(LIB_PREFIX)$(LIB_NAME_VERSION)$(LIB_SUFFIX)
-# Get relative exports/ directory when included from a wrapper, without trailing slash
-override EXPORTS_PATH = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
-
EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib
EXPORTS_LIB_SUBFOLDER_PATH ?= $(EXPORTS_LIB_PATH)/$(GOOS)/$(GOARCH)