From 4830ee7e2d46f751ee1b8554fd876a5740b1ca34 Mon Sep 17 00:00:00 2001 From: danipatko Date: Sun, 8 Feb 2026 03:30:24 +0100 Subject: [PATCH] . --- .gitea/workflows/deploy-server.yaml | 81 +++++++++-------------------- 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/.gitea/workflows/deploy-server.yaml b/.gitea/workflows/deploy-server.yaml index cc80524..10e4a60 100644 --- a/.gitea/workflows/deploy-server.yaml +++ b/.gitea/workflows/deploy-server.yaml @@ -49,24 +49,11 @@ jobs: git lfs install git lfs pull - # - name: Checkout Master Branch (LFS) - # uses: actions/checkout@v4 - # with: - # ref: master - # lfs: true - # fetch-depth: 0 - # clean: false - - - - - name: Install 7-Zip run: | sudo apt-get update sudo apt-get install -y p7zip-full - # bah - - name: Process Archives run: | # Define Paths @@ -80,52 +67,34 @@ jobs: # Find all archives recursively (zip, 7z, rar) find "$SOURCE_ROOT" -type f \( -name "*.zip" -o -name "*.7z" -o -name "*.rar" \) | while read archive; do - # Get the filename without extension (e.g., "cars/groupA/my_car.zip" -> "my_car") - filename=$(basename -- "$archive") - car_name="${filename%.*}" + # Get the filename without extension (e.g., "cars/groupA/my_car.zip" -> "my_car") + filename=$(basename -- "$archive") + car_name="${filename%.*}" - echo "--------------------------------------" - echo "Processing: $car_name" + echo "--------------------------------------" + echo "Processing: $car_name" - # Create a temp directory for extraction - temp_dir=$(mktemp -d) + # Create a temp directory for extraction + temp_dir=$(mktemp -d) - # Extract contents - 7z x "$archive" -o"$temp_dir" -y > /dev/null + # Extract contents + 7z x "$archive" -o"$temp_dir" -y > /dev/null - # FILTERING LOGIC - find "$temp_dir" -type f -not -name "skins/*/livery.png" \ - -not -name "skins/*/preview.jpeg" \ - -not -name "skins/*/ui_skin.json" \ - -not -name "ui/badge.png" \ - -not -name "ui/ui_car.json" \ - -not -name "data.acd" \ - -not -name "physics/standard/data.acd" \ - -not -name "physics/csp/data.acd" \ - -delete + # FILTERING LOGIC + find "$temp_dir" -type f -not -name "skins/*/livery.png" \ + -not -name "skins/*/preview.jpeg" \ + -not -name "skins/*/ui_skin.json" \ + -not -name "ui/badge.png" \ + -not -name "ui/ui_car.json" \ + -not -name "data.acd" \ + -not -name "physics/standard/data.acd" \ + -not -name "physics/csp/data.acd" \ + -delete - tree "$temp_dir" + tree "$temp_dir" - # # 5. Move to final Server Directory - # target_dir="$DEST_ROOT/$car_name" - - # # Clean old version if exists - # if [ -d "$target_dir" ]; then - # rm -rf "$target_dir" - # fi - # mkdir -p "$target_dir" - - # # Move files - # cp -r "$temp_dir"/* "$target_dir"/ - - # # Cleanup temp - # rm -rf "$temp_dir" - - echo "✅ Installed to: $target_dir" - done - - # - name: Verify Installation - # run: | - # echo "📁Final Server Directory Structure:" - # # Show directory tree 3 levels deep to verify structure without spamming files - # find ./server-data -maxdepth 3 -not -path '*/.*' + # - name: Verify Installation + # run: | + # echo "📁Final Server Directory Structure:" + # # Show directory tree 3 levels deep to verify structure without spamming files + # find ./server-data -maxdepth 3 -not -path '*/.*'