2017-01-14 12:10:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2018-03-06 10:50:18 +01:00
|
|
|
DATE=$(date +%Y%m%d)
|
|
|
|
|
VERSION=$(git describe --tags | cut -d '-' -f 1 | cut -d 'v' -f 2)
|
|
|
|
|
GITTAG=$(git rev-parse --short HEAD)
|
|
|
|
|
RELEASETYPE=$(git describe --tags | cut -d '_' -f 2)
|
|
|
|
|
BUILDTAG=$(git describe --tags | cut -d '-' -f 2-4)
|
2017-01-14 12:10:55 +01:00
|
|
|
|
|
|
|
|
DIRNAME="duplicati-$VERSION"
|
2018-03-06 10:50:18 +01:00
|
|
|
CWD=$(pwd)
|
2017-01-14 12:10:55 +01:00
|
|
|
|
|
|
|
|
git pull
|
|
|
|
|
bash duplicati-make-git-snapshot.sh "${GITTAG}" "${DATE}" "${VERSION}" "${RELEASETYPE}" "${BUILDTAG}-${GITTAG}"
|
|
|
|
|
|
|
|
|
|
touch "${DIRNAME}/releasenotes.txt"
|
|
|
|
|
rm -rf "${DIRNAME}/.git"
|
|
|
|
|
|
|
|
|
|
docker build -t "duplicati/debian-build:latest" - < Dockerfile.build
|
|
|
|
|
|
|
|
|
|
# Weirdness with time not being synced in Docker instance
|
|
|
|
|
sleep 5
|
|
|
|
|
docker run --workdir "/buildroot/${DIRNAME}" --volume "${CWD}":"/buildroot":"rw" "duplicati/debian-build:latest" dpkg-buildpackage
|
|
|
|
|
|
|
|
|
|
rm -rf "${DIRNAME}"
|