Skip to content

Commit

Permalink
Updated distrib.makefile to work with git.
Browse files Browse the repository at this point in the history
  • Loading branch information
vslavik committed Jan 11, 2010
1 parent 0e6830c commit 2348585
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions distrib.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

# The version to package. It is assumed that binaries in the tree are
# for this version.
VERSION := $(shell bzr tags | head -n 1 | sed -e 's/release-\([0-9.a-zA-Z_-]*\).*/\1/g')
VERSION := $(shell git describe | sed -e 's/^v//g')


sources_arch := WinSparkle-$(VERSION)-src.7z
binary_arch := WinSparkle-$(VERSION).zip
sources_base := WinSparkle-$(VERSION)-src
binary_base := WinSparkle-$(VERSION)
sources_arch := $(sources_base).7z
binary_arch := $(binary_base).zip
binary_files := \
AUTHORS COPYING NEWS README \
Release/WinSparkle.dll \
Expand All @@ -23,16 +25,19 @@ binary_files := \

all: $(binary_arch) $(sources_arch)


$(binary_arch): $(binary_files)
rm -f $@
zip -9 --junk-paths $@ $(binary_files)
@rm -f $(binary_base) $@
@mkdir $(binary_base)
cp -ra $(binary_files) $(binary_base)
zip -9 -r $@ $(binary_base)
@rm -rf $(binary_base) $(binary_base).tar

$(sources_arch):
rm -rf WinSparkle-$(VERSION) $@
bzr export --format=dir WinSparkle-$(VERSION)
7z a -m0=lzma -mx=9 $@ WinSparkle-$(VERSION)
rm -rf WinSparkle-$(VERSION)
@rm -rf $(sources_base) $@
git archive --prefix=$(sources_base)/ -o $(sources_base).tar HEAD
tar xf $(sources_base).tar
7z a -m0=lzma -mx=9 $@ $(sources_base)
@rm -rf $(sources_base) $(sources_base).tar


clean:
Expand Down

0 comments on commit 2348585

Please sign in to comment.