Skip to content

Commit a088996

Browse files
Update "make release" target
This commit allos the use of the VERSION variable to set the version to be tagged, instead of just incrementing the last digit in the VERSION file. It stops creating the .zip and .tar.gz files since those are kept in GitHub anyway. Signed-off-by: Thiago Macieira <[email protected]>
1 parent 8fc4528 commit a088996

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,15 @@ distcheck: .git
179179

180180
release: .git
181181
$(MAKE) -f $(MAKEFILE) distcheck
182+
ifeq ($(VERSION),)
182183
git -C $(SRCDIR). show HEAD:VERSION | \
183184
perl -l -n -e '@_ = split /\./; print "$$_[0]." . ($$_[1] + 1)' > $(SRCDIR)VERSION
184-
git -C $(SRCDIR). commit -s -m "Update version number" VERSION
185+
else
186+
echo "$(VERSION)" > VERSION
187+
endif
188+
if test -n "`git diff VERSION`"; then \
189+
git -C $(SRCDIR). commit -s -m "Update version number" VERSION; \
190+
fi
185191
{ echo "TinyCBOR release `cat $(SRCDIR)VERSION`"; \
186192
echo; \
187193
echo '# Write something nice about this release here'; \
@@ -194,7 +200,6 @@ release: .git
194200
} > $(SRCDIR).git/TAG_EDITMSG
195201
@`git -C $(SRCDIR). var GIT_EDITOR` $(SRCDIR).git/TAG_EDITMSG
196202
git -C $(SRCDIR). tag -a -F $(SRCDIR).git/TAG_EDITMSG $(GITTAGFLAGS) v`cat $(SRCDIR)VERSION`
197-
$(MAKE) -f $(MAKEFILE) dist
198203

199204
.PHONY: all check silentcheck configure install uninstall
200205
.PHONY: mostlyclean clean distclean

0 commit comments

Comments
 (0)