ffmpeg: Remove version string generation for HEAD builds

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
dinkypumpkin 2012-01-30 11:30:14 +00:00 committed by Adam Vandenberg
parent c270267495
commit 487970c819
1 changed files with 0 additions and 28 deletions

View File

@ -74,8 +74,6 @@ class Ffmpeg < Formula
end
end
write_version_file if ARGV.build_head?
system "make install"
if ARGV.include? "--with-tools"
@ -84,30 +82,4 @@ class Ffmpeg < Formula
end
end
# Makefile expects to run in git repo and generate a version number
# with 'git describe' command (see version.sh) but Homebrew build
# runs in temp copy created via git checkout-index, so 'git describe'
# does not work. Work around by writing VERSION file in build directory
# to be picked up by version.sh. Note that VERSION file will already
# exist in release versions, so this only applies to git HEAD builds.
def write_version_file
return if File.exists?("VERSION")
git_tag = "UNKNOWN"
Dir.chdir(cached_download) do
ver = `./version.sh`.chomp
if not $?.success? or ver == "UNKNOWN"
# fall back to git
ver = `git describe --tags --match N --always`.chomp
if not $?.success?
opoo "Could not determine build version from git repository - set to #{git_tag}"
else
git_tag = "git-#{ver}"
end
else
git_tag = ver
end
end
File.open("VERSION","w") {|f| f.puts git_tag}
end
end