2 Комити bfc9b51c5d ... 1505650124

Аутор SHA1 Порука Датум
  Konrad Mohrfeldt 1505650124 fix: check if package.json is actually tracking version data пре 1 година
  Konrad Mohrfeldt bfc9b51c5d fix: check if package.json is actually tracking version data пре 1 година
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      include/release.mk

+ 4 - 1
include/release.mk

@@ -34,7 +34,10 @@ SIGNATURE_EMAIL ?=
 IS_VERSION_WITH_BUMPVERSION = $(wildcard $(BUMP_VERSION_CONFIG))
 IS_VERSION_WITH_GIT = $(shell git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo 1 || true)
 IS_VERSION_WITH_DEB = $(wildcard debian/changelog)
-IS_VERSION_WITH_NPM = $(shell [ -e package.json ] && [ "$$(npm pkg get version 2>/dev/null || echo "{}")" != "{}" ] && echo 1 || true)
+# We only want to bump version numbers in a package.json (and package-lock.json) file if
+#  * a package.json exists
+#  * it actually contains a version number and is not just used for dependency tracking (`npm pkg get version` returns '{}' if no version is tracked)
+IS_VERSION_WITH_NPM = $(shell if [ -e package.json ] && [ "$$(npm pkg get version 2>/dev/null || echo "{}")" != "{}" ]; then echo 1; fi)
 
 # assemble the list of files to be committed during "make release-*"
 BUMP_VERSION_FILES ?= $(BUMP_VERSION_CONFIG)