sci/scripts/package-sci-deb.sh

29 lines
812 B
Bash
Executable File

#!/bin/bash
# TODO: SCI_VERSION env var
set -e
echo "building debbuilder image..."
docker build -t debbuilder -f deb-builder.dockerfile .
echo "building source dist..."
make dist
echo "building .deb in debbuilder docker image..."
docker run --rm -it -v .:/src debbuilder sh -c '\
cd && \
mkdir -p artifacts && \
cp /src/sci-1.0.0.tar.gz . && \
mv sci-1.0.0.tar.gz sci_1.0.0.orig.tar.gz && \
tar xf sci_1.0.0.orig.tar.gz && \
cd sci-1.0.0 && \
cp -r /src/debian . && \
debuild && \
cp ../*.deb ~/artifacts && \
cp ../*.dsc ~/artifacts && \
cp ../*.build ~/artifacts && \
cp ../*.buildinfo ~/artifacts && \
cp ../*.changes ~/artifacts && \
cp ../*.tar.xz ~/artifacts && \
cp ../*.tar.gz ~/artifacts && \
tar czf /src/artifacts.tar.gz ~/artifacts
'