Skip to content

Commit

Permalink
Merge b8408bd into 576fb1a
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Nov 10, 2021
2 parents 576fb1a + b8408bd commit 49c11bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ jobs:
with:
path: |
ImageMagick.exe
key: ${{ runner.os }}-6.9.12
key: ${{ runner.os }}-latest

- name: Download ImageMagick installer
shell: cmd
if: steps.imagemagick-installer-cache.outputs.cache-hit != 'true'
run: |
set IMAGEMAGICK_URL=https://download.imagemagick.org/ImageMagick/download/binaries/ImageMagick-6.9.12-19-Q16-x86-static.exe
python3 scripts/get-latest-imagemagick-win.py >im-url.txt
set /p IMAGEMAGICK_URL= <im-url.txt
rm im-url.txt
echo %IMAGEMAGICK_URL%
curl %IMAGEMAGICK_URL% -o ImageMagick.exe
Expand All @@ -104,7 +106,7 @@ jobs:
dir imagemagick
move imagemagick\ffmpeg.exe ffmpeg.exe
move imagemagick\convert.exe convert.exe
move imagemagick\magick.exe convert.exe
- name: Install Python dependencies
run: |
Expand Down
12 changes: 12 additions & 0 deletions scripts/get-latest-imagemagick-win.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
from urllib.request import urlopen

BINARIES_URL = "https://download.imagemagick.org/ImageMagick/download/binaries/"

content = urlopen(BINARIES_URL).read().decode("utf-8")

for line in reversed(content.split("<td>")):
if 'static.exe">ImageMagick' in line:
filename = line.split('"')[1]
sys.stdout.write(f"{BINARIES_URL}{filename}\n")
break

0 comments on commit 49c11bb

Please sign in to comment.