aptly/system/build-deb

19 lines
578 B
Bash
Executable File

#!/bin/sh -e
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
su aptly -c 'set -e; cd /work/src;
GOPATH=$PWD/.go go generate -v
# install and initialize swagger
GOPATH=$PWD/.go go install github.com/swaggo/swag/cmd/swag@latest
PATH=$PWD/.go/bin:$PATH swag init -q --markdownFiles docs
git checkout debian/changelog
DEBEMAIL="CI <runner@github>" dch -v `make version` "CI build"
dpkg-buildpackage -us -uc -b -d
mkdir -p build && mv ../*.deb build/
rm -rf obj-*-linux-gnu*
git checkout debian/changelog
cd build && ls -l *.deb
'