Files
playit-agent/build-scripts/download.sh
T
Patrick LorioandGitHub 48b71a553d Switch Linux release packaging to nFPM (#173)
* Adopt nFPM for Linux release packages

- Build deb, rpm, apk, archlinux, and ipk artifacts
- Update service, socket, and install scripts for the new package layout
- Adjust Linux socket permissions for the playit runtime directory

* Normalize package input paths in nfpm script

- Resolve relative inputs from the start directory
- Canonicalize directory portions when possible
- Preserve absolute paths unchanged

* Install Arch service file under /usr/lib/systemd/system

- Update nfpm packaging path for the Arch Linux systemd unit
- Keep the service install location aligned with Arch packaging conventions

* Handle permission-denied socket inspection on Linux

- Fall back to parent directory group checks when socket metadata is unreadable
- Reuse playit group access classification for socket and parent paths

* Package playitd alongside playit in nfpm builds

- Add `/usr/local/bin/playitd` symlink to the package manifest
- Create and remove the `playitd` launcher during install and uninstall

* Drop IPK packaging and split APK nfpm config

- Remove ipk outputs from download and package scripts
- Use a dedicated nfpm config for APK packages
- Keep shared service install paths on the main config
2026-06-03 14:54:28 -07:00

68 lines
1.3 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
VERSION="${1:-}"
if [ -z "$VERSION" ]; then
echo "missing version"
exit 1
fi
DOWN_FOLDER="${SCRIPT_DIR}/../target/downloads"
rm -rf "$DOWN_FOLDER"
mkdir -p "$DOWN_FOLDER"
FILES=(
playit-cli-linux-aarch64
playit-cli-linux-amd64
playit-cli-linux-armv7
playit-cli-linux-i686
playit-linux-aarch64
playit-linux-amd64
playit-linux-armv7
playit-linux-i686
playit-windows-x86-signed.exe
playit-windows-x86-signed.msi
playit-windows-x86.exe
playit-windows-x86.msi
playit-windows-x86_64-signed.exe
playit-windows-x86_64-signed.msi
playit-windows-x86_64.exe
playit-windows-x86_64.msi
playit_amd64.deb
playit_arm64.deb
playit_armhf.deb
playit_i386.deb
playit_x86_64.rpm
playit_aarch64.rpm
playit_armv7hl.rpm
playit_i386.rpm
playit_x86_64.apk
playit_aarch64.apk
playit_armv7.apk
playit_x86.apk
playit_x86_64.pkg.tar.zst
playit_aarch64.pkg.tar.zst
playit_armv7h.pkg.tar.zst
playit_i686.pkg.tar.zst
)
BASE_URL="https://github.com/playit-cloud/playit-agent/releases/download/v${VERSION}"
for file in "${FILES[@]}"; do
echo "Downloading $file"
curl -fL \
-o "${DOWN_FOLDER}/${file}" \
"${BASE_URL}/${file}"
done