Skip to content

Commit e3b2897

Browse files
committed
maint(Build): Makefile - Resolve package version for ZIP bundle at target runtime.
1 parent ccbec3a commit e3b2897

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Makefile

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ YARN ?= npx yarn
99
SOURCES = $(wildcard src/*.js) $(wildcard src/pat/*.js) $(wildcard src/lib/*.js)
1010
GENERATED = src/lib/depends_parse.js
1111

12-
define get_package_var
13-
$(shell node -p "require('./package.json').$(1)")
14-
endef
15-
PACKAGE_NAME := $(shell node -p "'$(call get_package_var,name)'.replace('@patternslib/', '')")
16-
PACKAGE_VERSION := $(call get_package_var,version)
17-
12+
PACKAGE_NAME = "patternslib"
1813

1914
all:: bundle css
2015

@@ -62,6 +57,7 @@ bundle: stamp-yarn
6257
$(YARN) run build
6358

6459
release-zip: clean-dist bundle
60+
$(eval PACKAGE_VERSION := $(shell node -p "require('./package.json').version"))
6561
@echo name is $(PACKAGE_NAME)
6662
@echo version is $(PACKAGE_VERSION)
6763
mkdir -p dist/$(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION)

0 commit comments

Comments
 (0)