Skip to content

Commit

Permalink
maint(Build): Makefile - Resolve package version for ZIP bundle at ta…
Browse files Browse the repository at this point in the history
…rget runtime.
  • Loading branch information
thet committed Mar 14, 2022
1 parent ccbec3a commit e3b2897
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ YARN ?= npx yarn
SOURCES = $(wildcard src/*.js) $(wildcard src/pat/*.js) $(wildcard src/lib/*.js)
GENERATED = src/lib/depends_parse.js

define get_package_var
$(shell node -p "require('./package.json').$(1)")
endef
PACKAGE_NAME := $(shell node -p "'$(call get_package_var,name)'.replace('@patternslib/', '')")
PACKAGE_VERSION := $(call get_package_var,version)

PACKAGE_NAME = "patternslib"

all:: bundle css

Expand Down Expand Up @@ -62,6 +57,7 @@ bundle: stamp-yarn
$(YARN) run build

release-zip: clean-dist bundle
$(eval PACKAGE_VERSION := $(shell node -p "require('./package.json').version"))
@echo name is $(PACKAGE_NAME)
@echo version is $(PACKAGE_VERSION)
mkdir -p dist/$(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION)
Expand Down

0 comments on commit e3b2897

Please sign in to comment.