laster 0.0.2

This commit is contained in:
2026-05-26 15:43:56 +07:00
parent e2c4881bb7
commit 8ceb1bb1df
24 changed files with 583 additions and 40 deletions

View File

@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
VERSION="${VERSION:-0.1.3}"
VERSION="${VERSION:-1.0.0}"
ARCH="${ARCH:-amd64}"
DEB_COMPRESSION="${DEB_COMPRESSION:-gzip}"
PKG_NAME="local-installer-agent"
BUILD_ROOT="${BUILD_ROOT:-build}"
BUILD_DIR="${BUILD_ROOT}/${PKG_NAME}_${VERSION}_${ARCH}"
@@ -28,6 +29,10 @@ mkdir -p "${BUILD_DIR}/DEBIAN"
cp -r app "${BUILD_DIR}/opt/local-installer-agent/"
cp requirements.txt "${BUILD_DIR}/opt/local-installer-agent/"
find "${BUILD_DIR}/opt/local-installer-agent/app" \
\( -type d -name "__pycache__" -o -type f \( -name "*.pyc" -o -name "*.pyo" \) \) \
-exec rm -rf {} +
cp packaging/systemd/local-installer-agent.service \
"${BUILD_DIR}/etc/systemd/system/local-installer-agent.service"
@@ -64,7 +69,7 @@ ALLOW_DOCKER=false
ALLOW_DOCKER_COMPOSE=false
EOF
dpkg-deb --root-owner-group --build "${BUILD_DIR}"
dpkg-deb -Z"${DEB_COMPRESSION}" --root-owner-group --build "${BUILD_DIR}"
echo "Built package:"
echo "${OUTPUT_PACKAGE}"