forked from archive/andrewferrier_email2pdf
Support auto-calculation of Version string - closes #39.
This commit is contained in:
parent
263ea6b167
commit
310fb4326d
4 changed files with 12 additions and 5 deletions
|
@ -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/*
|
||||
|
|
12
Makefile
12
Makefile
|
@ -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
1
debian/DEBIAN/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
control
|
|
@ -1,5 +1,5 @@
|
|||
Package: email2pdf
|
||||
Version: 0.7.13
|
||||
Version: <version_goes_here>
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
Loading…
Add table
Reference in a new issue