Update create-release to work with version numbers from theme.json

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
This commit is contained in:
Isaac Bennetch
2018-04-19 00:57:20 -04:00
parent 59d838c465
commit a4dbba67da
+5 -1
View File
@@ -64,7 +64,11 @@ while [ $# -gt 0 ] ; do
esac esac
done done
VERSION=`php -r "include '$THEME/info.inc.php'; echo \\\$theme_full_version;"` if [ ! -f "$THEME/info.inc.php" ]; then
VERSION=`php -r "echo json_decode(file_get_contents('$THEME/theme.json'), true)['version'];"`
else
VERSION=`php -r "include '$THEME/info.inc.php'; echo \\\$theme_full_version;"`
fi
NAME=$THEME-$VERSION NAME=$THEME-$VERSION
echo "Creating release for $THEME $VERSION ($NAME)" echo "Creating release for $THEME $VERSION ($NAME)"