Commits

Jan Christoph Ebersbach  committed ea8b141

fix broken versioning

  • Participants
  • Parent commits 3025527

Comments (0)

Files changed (2)

 include config.mk
-VVERSION=$(shell hg identify -r $(shell hg identify -i) | awk '{print $$2}')
+VVERSION=$(shell hg qpop -a; hg identify -r $(shell hg identify -i) | awk '{print $$2}')
 
 .PHONY: all build clean cleanconfigh
 
 all: build
 
-build: .hg/patches .hg/patches/README ./clean.sh
+build: .hg/patches .hg/patches/README clean.sh
 	mkdir -p $(VVERSION)
 	./clean.sh $(VVERSION) $(args)
 
 rev=$(hg identify -i)
 tip=$(hg identify -n -r "$rev")_$(hg identify -r "$rev" | awk '{print $1}')
 tag=$(hg tags | awk "/$rev\$/ {print \$1}")
-if [[ -n $tag ]]; then
+if [[ -n $tag ]] && [[ $tag != 'tip' ]]; then
 	tip="${tip}_tag_${tag}"
 fi
 release="$1"
 shift
+if [[ $release = 'tip' ]]; then
+	release=$(hg identify -t -r $(hg tags | sed -n -e '2p' | sed -e 's/^.*://'))
+fi
+if [[ -z $release ]]; then
+	echo 'Unable to find a release.'
+	exit 1
+fi
 mkdir -p "$release/${tip}"
 
 cp .hg/patches/README "$release/${tip}/"