From 6c905a7d32ad58e345f300ae90226f7b9cc4c297 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Sat, 30 Mar 2024 10:29:42 +0100 Subject: [PATCH] Fixed install-ffmpeg for empty patch --- .github/workflows/test.yml | 6 +++--- Makefile | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91da051..be1629a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] env: FFMPEG_VERSION: n5.1.2 @@ -64,12 +64,12 @@ jobs: run: | choco install make choco install yasm - echo "FFMPEG_POST_CHECKOUT='&& git apply $(cygpath -u ${{ github.WORKSPACE }})/.github/workflows/windows.patch'" >> $env:GITHUB_ENV + echo "FFMPEG_PATCH_PATH='$(cygpath -u ${{ github.WORKSPACE }})/.github/workflows/windows.patch'" >> $env:GITHUB_ENV - if: ${{ steps.load-ffmpeg-cache.outputs.cache-hit != 'true' }} name: Install ffmpeg run: | - make install-ffmpeg srcPath=${{ env.FFMPEG_PATH }}/src version=${{ env.FFMPEG_VERSION }} postCheckout=${{ env.FFMPEG_POST_CHECKOUT }} + make install-ffmpeg srcPath=${{ env.FFMPEG_PATH }}/src version=${{ env.FFMPEG_VERSION }} patchPath=${{ env.FFMPEG_PATCH_PATH }} - if: ${{ steps.load-ffmpeg-cache.outputs.cache-hit != 'true' }} name: Save ffmpeg cache diff --git a/Makefile b/Makefile index 3b74b24..7b58c3d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -version = "n5.1.2" -srcPath = "tmp/$(version)/src" -postCheckout = "" -platform = "" +version=n5.1.2 +srcPath=tmp/$(version)/src +patchPath= +platform= generate-flags: go run internal/cmd/flags/main.go @@ -9,9 +9,11 @@ generate-flags: install-ffmpeg: rm -rf $(srcPath) mkdir -p $(srcPath) - # cd $(srcPath) is necessary for windows build since otherwise git doesn't clone in the proper dir - cd $(srcPath) && git clone https://github.com/FFmpeg/FFmpeg $(srcPath) - cd $(srcPath) && git checkout $(version) $(postCheckout) + cd $(srcPath) && git clone https://github.com/FFmpeg/FFmpeg . + cd $(srcPath) && git checkout $(version) +ifneq "" "$(patchPath)" + cd $(srcPath) && git apply $(patchPath) +endif cd $(srcPath) && ./configure --prefix=.. $(configure) cd $(srcPath) && make cd $(srcPath) && make install