docker: improve dev env

- abort docker scripts on error
- generate version in system tests
- build debian packages in docker
- add make clean target
- fix lint
This commit is contained in:
André Roth
2024-08-02 23:17:29 +02:00
parent b342af0d96
commit 98b1ed07d1
14 changed files with 60 additions and 61 deletions
+7 -14
View File
@@ -1,17 +1,10 @@
#!/bin/sh
# cleanup
rm -rf /app/tmp
rm -rf /tmp/aptly*
usermod -u `stat -c %u /app` aptly >/dev/null
chown -R `stat -c %u /app` /var/lib/aptly
# use same /home/runner dir as in github workflow
chown -R `stat -c %u /app` /home/runner
cmd=$@
if [ -z "$cmd" ]; then
cmd="bash"
fi
su aptly -c "cd /app; export HOME=/home/runner; export PATH=\$PATH:/app/build; $cmd"
test -z "$cmd" && cmd="bash"
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
cd /work/src
exec sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go $cmd