diff --git a/bin/build-release.sh b/bin/build-release.sh
index 344a6380e25776e3f270c40f7df02f6a1c7668ef..6820c7a5379ed3debf433ad54262d611040e0aac 100755
--- a/bin/build-release.sh
+++ b/bin/build-release.sh
@@ -40,6 +40,9 @@ if [ ! -x "$TARGET/composer.phar" ]; then
     curl -sS https://getcomposer.org/installer | php -- --install-dir=$TARGET
 fi
 
+# Set the version in composer.json
+php "$TARGET/composer.phar" config version "$VERSION" -d "$TARGET"
+
 # Install dependencies (without vcs history or dev tools)
 php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET"