build: add packages for deb and rpm to release (#3202)
* support packing deb/rpm/archlinux * .-. * initial test * fix postinstall, remove execstop * bash -> sh, create toml manually if it doesn't exist (thanks debian) * don't forget that newline * postrm * comments, contrib -> packaging/linux * contrib > packaging in .goreleaser * actually add toml * openrc/sysv templates * add apk. nothing else yet * wait, we have a ntive uninstall * fix: merge errors, move packaging to release * chore: remove old goreleaser conf * ci: remove `release` dependency on `docker push` * ci: fix release version * ci: upload packages * ci: try to fix json file list * ci: replace the json file list with a txt artifact * postremove -> preremove, skip install/remove error * actually do preremove * better preremove * ci: fix * ci: fix? * ci: clean-up * ci: try to change labels and filenames * ci: fix? * ci: fix? * ci: add `make package` target * ci: make labels more readable hope it doesn't break the pipeline again * build: remove alpine and archlinux packages, for now. --------- Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
action=$1
|
||||
|
||||
remove() {
|
||||
postinstall_flag="/var/lib/navidrome/.installed"
|
||||
|
||||
if [ -f "$postinstall_flag" ]; then
|
||||
# If this fails, ignore it
|
||||
navidrome service uninstall || :
|
||||
rm "$postinstall_flag"
|
||||
|
||||
printf "The following may still be present (especially if you have not done a purge):\n"
|
||||
printf "1. /etc/navidrome/navidrome.toml (configuration file)\n"
|
||||
printf "2. /var/lib/navidrome (database/cache)\n"
|
||||
printf "3. /opt/navidrome (default location for music)\n"
|
||||
printf "4. The Navidrome user (user name navidrome)\n"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$action" in
|
||||
"1" | "upgrade")
|
||||
# For an upgrade, do nothing
|
||||
# Leave the service file untouched
|
||||
# This is relevant for RPM/DEB-based installs
|
||||
;;
|
||||
*)
|
||||
remove
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user