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:
parent
533731bf95
commit
54a4fe72ef
11 changed files with 459 additions and 208 deletions
26
packaging/scripts/postinstall.sh
Normal file
26
packaging/scripts/postinstall.sh
Normal 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
|
||||
18
packaging/scripts/postremove.sh
Normal file
18
packaging/scripts/postremove.sh
Normal 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
|
||||
6
packaging/scripts/preremove.sh
Normal file
6
packaging/scripts/preremove.sh
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue