diff --git a/build/buildAll.sh b/build/buildAll.sh index e3a9b0a..b9315ab 100755 --- a/build/buildAll.sh +++ b/build/buildAll.sh @@ -1,10 +1,11 @@ #!/bin/bash -e VERSION=`egrep 'VERSION = ([0-9.+])' ../common.mk | awk '{print $3}'` +REVISION=`egrep 'REVISION = ([0-9.+])' ../common.mk | awk '{print $3}'` mkdir -p ../dist rm -rf ../dist/* -linux/build.sh $VERSION +linux/build.sh $VERSION $REVISION -win32/build.sh $VERSION +win32/build.sh $VERSION $REVISION diff --git a/build/linux/build.sh b/build/linux/build.sh index 3b650e6..90bceac 100755 --- a/build/linux/build.sh +++ b/build/linux/build.sh @@ -7,6 +7,7 @@ BUILDROOT="build/linux" cd ../.. VERSION=$1 +REVISION=$2 make clean make src-dist diff --git a/build/win32/build.sh b/build/win32/build.sh index c878658..a88127a 100755 --- a/build/win32/build.sh +++ b/build/win32/build.sh @@ -7,7 +7,8 @@ BUILDROOT="build/win32" cd ../.. VERSION=$1 -FOLDER="blobWarsAttrition-$1" +REVISION=$2 +FOLDER="blobWarsAttrition-$1.$2" OUT="$BUILDROOT/$FOLDER" make -f makefile.win32 clean diff --git a/makefile b/makefile index c7b76dd..8d82267 100644 --- a/makefile +++ b/makefile @@ -76,23 +76,23 @@ uninstall: # prepare an archive for the program dist: - $(RM) -rf $(PROG)-$(VERSION) - mkdir $(PROG)-$(VERSION) - cp -rL $(DIST_FILES) $(PROG)-$(VERSION) - tar czf $(PROG)-$(VERSION)-$(REVISION).linux-x86.tar.gz $(PROG)-$(VERSION) + $(RM) -rf $(PROG)-$(VERSION).$(REVISION) + mkdir $(PROG)-$(VERSION).$(REVISION) + cp -rL $(DIST_FILES) $(PROG)-$(VERSION).$(REVISION) + tar czf $(PROG)-$(VERSION)-$(REVISION).linux-x86.tar.gz $(PROG)-$(VERSION).$(REVISION) mkdir -p dist mv $(PROG)-$(VERSION)-$(REVISION).linux-x86.tar.gz dist - $(RM) -rf $(PROG)-$(VERSION) + $(RM) -rf $(PROG)-$(VERSION).$(REVISION) # prepare an archive for the program src-dist: - $(RM) -rf $(PROG)-$(VERSION) - mkdir $(PROG)-$(VERSION) - cp -rL $(SRC_DIST_FILES) $(PROG)-$(VERSION) - git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short >$(PROG)-$(VERSION)/CHANGELOG.raw - tar czf $(PROG)-$(VERSION)-$(REVISION).src.tar.gz $(PROG)-$(VERSION) + $(RM) -rf $(PROG)-$(VERSION).$(REVISION) + mkdir $(PROG)-$(VERSION).$(REVISION) + cp -rL $(SRC_DIST_FILES) $(PROG)-$(VERSION).$(REVISION) + git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short >$(PROG)-$(VERSION).$(REVISION)/CHANGELOG.raw + tar czf $(PROG)-$(VERSION)-$(REVISION).src.tar.gz $(PROG)-$(VERSION).$(REVISION) mkdir -p dist mv $(PROG)-$(VERSION)-$(REVISION).src.tar.gz dist - $(RM) -rf $(PROG)-$(VERSION) + $(RM) -rf $(PROG)-$(VERSION).$(REVISION) .PHONY: dist