From 909d5f2ff8688c02167c5bf78d0368e8dee4491a Mon Sep 17 00:00:00 2001 From: zhaoblake Date: Fri, 1 Dec 2023 15:53:29 +0800 Subject: [PATCH 1/2] Fix compatibility issue on Windows --- src/flask_assets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flask_assets.py b/src/flask_assets.py index 026f987..22d78c5 100644 --- a/src/flask_assets.py +++ b/src/flask_assets.py @@ -275,6 +275,9 @@ def convert_item_to_flask_url(self, ctx, item, filepath=None): else: filename = rel_path + # Windows compatibility + filename = filename.replace("\\", "/") + flask_ctx = None if not has_request_context(): flask_ctx = ctx.environment._app.test_request_context() From 081888dbcd570c0e2bd78d5cb616ac40baf37fd6 Mon Sep 17 00:00:00 2001 From: Grey Li Date: Fri, 15 Dec 2023 21:52:23 +0800 Subject: [PATCH 2/2] Enable CI for Windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 947f642..f9e089d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: name: tests strategy: matrix: - os: [ubuntu-latest, macos-latest] # TODO: add windows-latest + os: [ubuntu-latest, macos-latest, windows-latest] python: ['3.8', '3.9', '3.10', '3.11', '3.12'] fail-fast: false runs-on: ${{ matrix.os }}