From 8e8813a0a1fb035e8f25ac9b8ae1d7ba5d1d2be4 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 31 Mar 2009 21:11:04 +0000 Subject: [PATCH] Merge improved version number generation from trunk. Originally committed as revision 18288 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5 --- VERSION | 1 + version.sh | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000..2eb3c4fe4e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.5 diff --git a/version.sh b/version.sh index adaa46aa91..9809d6d14e 100755 --- a/version.sh +++ b/version.sh @@ -13,12 +13,16 @@ if ! test $revision; then test $revision && revision=git-$revision fi -# no version number found +# no revision number found test $revision || revision=UNKNOWN -test -n "$3" && revision=$revision-$3 +# releases extract the version number from the VERSION file +version=$(cat VERSION 2> /dev/null) +test $version || version=$revision -NEW_REVISION="#define FFMPEG_VERSION \"$revision\"" +test -n "$3" && version=$version-$3 + +NEW_REVISION="#define FFMPEG_VERSION \"$version\"" OLD_REVISION=$(cat version.h 2> /dev/null) # Update version.h only on revision changes to avoid spurious rebuilds