From e943d1606814c852a2cdca9fc6cb6ce03acc4286 Mon Sep 17 00:00:00 2001 From: Zijian Zhang Date: Wed, 22 Nov 2023 16:34:06 +0800 Subject: [PATCH] Revert "ci: add include to release" This reverts commit 96f2484f123d4ce808debd20de0dfd9256ffdd72. --- .github/workflows/release_levilamina.yml | 12 ++------ scripts/make_include.py | 37 ------------------------ 2 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 scripts/make_include.py diff --git a/.github/workflows/release_levilamina.yml b/.github/workflows/release_levilamina.yml index f52d610db4..6649ebdf98 100644 --- a/.github/workflows/release_levilamina.yml +++ b/.github/workflows/release_levilamina.yml @@ -49,20 +49,14 @@ jobs: - uses: actions/download-artifact@v3 with: name: levilamina-windows-x64-${{ github.sha }} - path: release/lib + path: bin - run: | - python scripts/make_include.py - - - run: | - cp -r include release/ - - - run: | - cp CHANGELOG.md LICENSE.md README.md release/ + cp CHANGELOG.md LICENSE.md README.md bin/ - name: Archive release run: | - cd release + cd bin zip -r ../levilamina-windows-x64.zip * cd .. diff --git a/scripts/make_include.py b/scripts/make_include.py deleted file mode 100644 index 9e97d39cb4..0000000000 --- a/scripts/make_include.py +++ /dev/null @@ -1,37 +0,0 @@ -import os -import shutil - -# Get script directory -script_dir = os.path.dirname(os.path.realpath(__file__)) - -# Calculate source directory -source_dir = os.path.join(script_dir, "..", "src") - -# Calculate include directory -include_dir = os.path.join(script_dir, "..", "include") - -# Remove include directory -if os.path.exists(include_dir): - shutil.rmtree(include_dir) - -# Create include directory -os.mkdir(include_dir) - -# Copy all header files recursively -for root, dirs, files in os.walk(source_dir): - for file in files: - if file.endswith(".h"): - # Calculate source file path - source_file = os.path.join(root, file) - - # Calculate relative path - relative_path = os.path.relpath(source_file, source_dir) - - # Calculate include file path - include_file = os.path.join(include_dir, relative_path) - - # Create include directory - os.makedirs(os.path.dirname(include_file), exist_ok=True) - - # Copy file - shutil.copy(source_file, include_file)