Skip to content

Commit 6778df0

Browse files
committed
Pass version while building lib
1 parent 78bc231 commit 6778df0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ LANTERN_LIB_NAME := liblantern
1313
LANTERN_CORE := lantern-core
1414
RADIANCE_REPO := github.com/getlantern/radiance
1515
FFI_DIR := $(LANTERN_CORE)/ffi
16+
## APP_VERSION is the version defined in pubspec.yaml
17+
APP_VERSION := $(shell grep '^version:' pubspec.yaml | sed 's/version: //;s/+.*//;s/ //g')
18+
VERSION ?= $(APP_VERSION)
1619
EXTRA_LDFLAGS ?= -X '$(RADIANCE_REPO)/common.Version=$(VERSION)'
1720

1821
DARWIN_APP_NAME := $(CAPITALIZED_APP).app
@@ -142,9 +145,6 @@ APPDMG := $(call get-command,appdmg)
142145

143146
DART_DEFINES := --dart-define=BUILD_TYPE=$(BUILD_TYPE) $(if $(VERSION),--dart-define=VERSION=$(VERSION),)
144147

145-
## APP_VERSION is the version defined in pubspec.yaml
146-
APP_VERSION := $(shell grep '^version:' pubspec.yaml | sed 's/version: //;s/ //g')
147-
148148
INSTALLER_RESOURCES := installer-resources
149149

150150
# Missing and Guards

0 commit comments

Comments
 (0)