From 70f16a78556948a31217889d5ab6a498b51577c6 Mon Sep 17 00:00:00 2001 From: Chris Fenner Date: Sun, 23 Feb 2025 09:18:43 -0800 Subject: [PATCH] fix file globs We had a number of file globs like .*.pdf that should've been *.pdf, because in some cases the file is just .pdf --- .github/workflows/render.yml | 6 +++--- filter/convert-images.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index 20ce62e..4a26208 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -121,7 +121,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.pdf + file: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}*.pdf tag: ${{ github.ref }} asset_name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.pdf overwrite: true @@ -132,12 +132,12 @@ jobs: with: name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.pdf path: | - ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.pdf + ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}*.pdf if: always() - name: Upload logs uses: actions/upload-artifact@v4 with: name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.log path: | - ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.log + ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}*.log if: always() diff --git a/filter/convert-images.lua b/filter/convert-images.lua index 0e2a5b3..2548460 100644 --- a/filter/convert-images.lua +++ b/filter/convert-images.lua @@ -88,7 +88,7 @@ function Image (img) -- Delete stale copies of this file. This makes it easier to cache only the latest converted pdfs -- Don't do this if the "keepstaleimages" variable is set. if not PANDOC_WRITER_OPTIONS.variables["keepstaleimages"] then - deleteFilesExcept(img.src .. ".*.convert.pdf", new_filename) + deleteFilesExcept(img.src .. "*.convert.pdf", new_filename) end img.src = new_filename end