aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-03-31 21:11:04 +0000
committerDiego Biurrun <diego@biurrun.de>2009-03-31 21:11:04 +0000
commit8e8813a0a1fb035e8f25ac9b8ae1d7ba5d1d2be4 (patch)
tree27d94091ed854641ee0c7f416a74e28b6b81fc37
parentc3c2325adcef1acdafccaba566a854823a95beb0 (diff)
downloadffmpeg-8e8813a0a1fb035e8f25ac9b8ae1d7ba5d1d2be4.tar.gz
Merge improved version number generation from trunk.
Originally committed as revision 18288 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
-rw-r--r--VERSION1
-rwxr-xr-xversion.sh10
2 files changed, 8 insertions, 3 deletions
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