Support auto-calculation of Version string - closes .

This commit is contained in:
Andrew Ferrier 2015-07-01 20:43:28 -05:00
parent 263ea6b167
commit 310fb4326d
4 changed files with 12 additions and 5 deletions

View file

@ -32,5 +32,5 @@ RUN wget -O /etc/vim/vimrc.local https://raw.githubusercontent.com/tpope/vim-sen
COPY . /tmp/email2pdf/
COPY docker/email2pdf/getmail /etc/cron.d/
WORKDIR /tmp/email2pdf
RUN make builddeb && sh -c 'ls -1 /tmp/email2pdf/*.deb | xargs -L 1 gdebi -n' && cp /tmp/email2pdf/*.deb /tmp
RUN make builddeb_real && sh -c 'ls -1 /tmp/email2pdf/*.deb | xargs -L 1 gdebi -n' && cp /tmp/email2pdf/*.deb /tmp
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/*

View file

@ -1,7 +1,13 @@
TEMPDIR := $(shell mktemp -t tmp.XXXXXX -d)
FLAKE8 := $(shell which flake8)
builddeb:
determineversion:
$(eval GITDESCRIBE := $(shell git describe --dirty))
sed 's/Version: .*/Version: $(GITDESCRIBE)/' debian/DEBIAN/control_template > debian/DEBIAN/control
builddeb: determineversion builddeb_real
builddeb_real:
sudo apt-get install build-essential
cp -R debian/DEBIAN/ $(TEMPDIR)
mkdir -p $(TEMPDIR)/usr/bin
@ -14,10 +20,10 @@ builddeb:
fakeroot chmod -R u+x $(TEMPDIR)/usr/bin
fakeroot dpkg-deb --build $(TEMPDIR) .
builddocker:
builddocker: determineversion
docker build -t andrewferrier/email2pdf .
builddocker_nocache:
builddocker_nocache: determineversion
docker build --no-cache -t andrewferrier/email2pdf .
rundocker_interactive: builddocker

1
debian/DEBIAN/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
control

View file

@ -1,5 +1,5 @@
Package: email2pdf
Version: 0.7.13
Version: <version_goes_here>
Section: base
Priority: optional
Architecture: all