podman to compile for debian

This commit is contained in:
Priec
2026-09-02 08:57:57 +02:00
parent b5a7860834
commit 0913d10885
3 changed files with 99 additions and 5 deletions

View File

@@ -37,19 +37,91 @@ tar \
--exclude='*/.direnv' \
--exclude='./.env' \
--exclude='*/.env' \
--exclude='./.env.*' \
--exclude='*/.env.*' \
--exclude='./.env_*' \
--exclude='*/.env_*' \
--exclude='*/.envrc' \
--exclude='*/.agents' \
--exclude='*/.claude' \
--exclude='*/.codex' \
--exclude='*/.codex-scheduled' \
--exclude='*/.forge' \
--exclude='*/.opencode' \
--exclude='*/.idea' \
--exclude='*/.vscode' \
--exclude='./.aider*' \
--exclude='*/tantivy_indexes' \
--exclude='*/dumps' \
--exclude='*/.postgres-data' \
--exclude='*/benchmark-results' \
--exclude='*/.mutants-run' \
--exclude='./mutants*' \
--exclude='*/metrics_output' \
--exclude='*/metrics.json' \
--exclude='*/perf.data*' \
--exclude='*/flamegraph.svg' \
--exclude='*/__pycache__' \
--exclude='./client-gui2/node_modules' \
--exclude='*/node_modules' \
--exclude='./client-gui2/dist' \
--exclude='./client-gui2/dist-ssr' \
--exclude='./client-gui2/coverage' \
--exclude='./client-gui2/.vite' \
--exclude='./client-gui2/src-tauri/gen/schemas' \
--exclude='./client-gui2/scripts' \
--exclude='*.tsbuildinfo' \
--exclude='*.log' \
--exclude='*.swp' \
--exclude='*.swo' \
--exclude='*~' \
--exclude='*.local' \
--exclude='./server/docs-prod' \
--exclude='./testing' \
--exclude='./run_bins' \
--exclude='./corporate_erp' \
--exclude='./debian-dist' \
--exclude='./result' \
-C /source -cf - . \
--exclude='./result-*' \
-C /source -cf - \
Cargo.toml \
Cargo.lock \
.cargo \
.sqlx \
client \
client-gui2 \
common \
komp-app \
packaging \
search \
server \
tui-canvas \
tui-pages \
web \
| tar -C "$source_root" -xf -
unexpected_snapshot_path="$(find "$source_root" \
\( \
-name target -o \
-name node_modules -o \
-name tantivy_indexes -o \
-name dumps -o \
-name .postgres-data -o \
-name .direnv -o \
-name .env -o \
-name '.env.*' -o \
-name '.env_*' -o \
-name .envrc -o \
-name benchmark-results -o \
-name metrics_output -o \
-name 'perf.data*' \
\) \
-print -quit)"
if [[ -n "$unexpected_snapshot_path" ]]; then
echo "Generated or private data entered the production snapshot: $unexpected_snapshot_path" >&2
exit 1
fi
echo "Source snapshot size: $(du -sh "$source_root" | cut -f1)"
cd "$source_root/client-gui2"
echo "+ yarn install --frozen-lockfile --non-interactive"
yarn install --frozen-lockfile --non-interactive
@@ -78,6 +150,16 @@ fi
install -Dm755 "$server_binary" /out/bin/server
cd "$source_root/client-gui2"
appimage_bundle_dir=/cargo-target/release/bundle/appimage
case "$appimage_bundle_dir" in
/cargo-target/release/bundle/appimage)
rm -rf -- "$appimage_bundle_dir"
;;
*)
echo "Refusing to clear unexpected AppImage staging path: $appimage_bundle_dir" >&2
exit 1
;;
esac
echo "+ yarn tauri build --bundles appimage"
set +e
APPIMAGE_EXTRACT_AND_RUN=1 \
@@ -87,7 +169,7 @@ tauri_status=$?
set -e
shopt -s nullglob
gui_appimages=(/cargo-target/release/bundle/appimage/*.AppImage)
gui_appimages=("$appimage_bundle_dir"/*.AppImage)
gui_bundle=""
if [[ $tauri_status -eq 0 && ${#gui_appimages[@]} -gt 0 ]]; then
gui_bundle="${gui_appimages[0]}"
@@ -99,7 +181,7 @@ if [[ $tauri_status -eq 0 && ${#gui_appimages[@]} -gt 0 ]]; then
fi
if [[ -z "$gui_bundle" ]]; then
gui_appdir=/cargo-target/release/bundle/appimage/komp_ac.AppDir
gui_appdir="$appimage_bundle_dir/komp_ac.AppDir"
if [[ -d "$gui_appdir" ]] \
&& cmp -s /cargo-target/release/client-gui2 "$gui_appdir/usr/bin/client-gui2"; then
gui_bundle="$gui_appdir"