Add deb package and nightly distribution (#1977)

- Add publishing automated debian package releases via Cloudsmith.io, which allows evcc to be installed and updated via `apt`
- Add nightly docker (:latest) and deb distribution
- Disable docker builds for every commit on master
- Allow nightly builds to be triggered manually
This commit is contained in:
Andreas Linde 2021-12-04 13:05:18 +01:00 • committed by GitHub
parent 533731bf95
commit 54a4fe72ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 459 additions and 208 deletions

View file

@ -0,0 +1,26 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask evcc.service >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled evcc.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable evcc.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state evcc.service >/dev/null || true
fi
# Restart only if it was already started
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
deb-systemd-invoke try-restart evcc.service >/dev/null || true
fi
fi
fi

View file

@ -0,0 +1,18 @@
set -e
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
fi
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask evcc.service >/dev/null || true
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge evcc.service >/dev/null || true
deb-systemd-helper unmask evcc.service >/dev/null || true
fi
fi

View file

@ -0,0 +1,6 @@
#!/bin/sh
set -e
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop evcc.service >/dev/null || true
fi