Skip to content

Commit 349cab0

Browse files
committed
Check the version before building tarball
I keep forgetting to do this. It's such a stupid thing.
1 parent 986785c commit 349cab0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ $(PKG):
178178
--out $(PKG)
179179

180180
$(TARBALL): node out/doc
181+
@if [ $(shell ./node --version) = "$(VERSION)" ]; then \
182+
exit 0; \
183+
else \
184+
echo "" >&2 ; \
185+
echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \
186+
echo "Did you remember to update src/node_version.cc?" >&2 ; \
187+
echo "" >&2 ; \
188+
exit 1 ; \
189+
fi
181190
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
182191
mkdir -p $(TARNAME)/doc
183192
cp doc/node.1 $(TARNAME)/doc/node.1

0 commit comments

Comments
 (0)