Skip to content

Commit af7fcee

Browse files
committed
fix: name the FFmpeg build after its release, not the commit
FFmpeg names its version after the git tag it finds in its source, and the shallow submodule checkout CI makes has no tags, so the libraries built there called themselves 9047fa1 rather than n8.1, and the test checking that the pinned release is loaded failed on every platform that runs it. The build now hands make the release the source says it is, read from its RELEASE file, so the name is the same however the source was checked out. It goes to make as REVISION: the makefile sets the revision version.sh reads from that variable, over anything in the environment.
1 parent af9690f commit af7fcee

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎webrtc-java-media/src/main/cpp/dependencies/ffmpeg/CMakeLists.txt‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,15 @@ fi
468468
"# Generated by CMake. Builds FFmpeg ${FFMPEG_VERSION} for webrtc-java-media.
469469
set -e
470470
${FFMPEG_SHELL_PREAMBLE}cd \"${FFMPEG_BUILD_DIR_SH}\"
471+
# FFmpeg names its version after the git tag it finds, and a shallow clone of
472+
# the submodule has none, so it would name itself after a commit hash. Handing
473+
# make the release the source says it is names it the same way however the
474+
# source was checked out. It has to be REVISION on the make command line: the
475+
# makefile sets the revision version.sh reads from it, over the environment.
476+
FFMPEG_REVISION=\"n$(cat \"${FFMPEG_SOURCE_DIR_SH}/RELEASE\")\"
471477
\"${FFMPEG_SOURCE_DIR_SH}/configure\" ${FFMPEG_CONFIGURE_ARGS_STR}
472-
\"${FFMPEG_MAKE}\" -j${BUILD_JOBS}
473-
\"${FFMPEG_MAKE}\" install
478+
\"${FFMPEG_MAKE}\" -j${BUILD_JOBS} REVISION=\"$FFMPEG_REVISION\"
479+
\"${FFMPEG_MAKE}\" install REVISION=\"$FFMPEG_REVISION\"
474480
")
475481

476482
if(WIN32)

0 commit comments

Comments
 (0)