php-spark/.spark/build/update-version.sh
Christopher Vagnetoft 0c7fc0196a Multiple fixes
* PDO shell improvements: .query command, -r and --db on command
  line to read commands from file or preselect database.
* Updated build scripts and readme
2021-12-16 16:01:17 +01:00

21 lines
445 B
Bash
Executable File

#!/bin/bash
if [ ! -d .git ]; then
if [ ! -f src/version ]; then
echo -e "<?php define(\"APP_VERSION\", \"unknown\");" > src/version
echo -e "* Version: \e[1munknown\e[0m"
fi
exit 0
fi
VERSION="$(git describe --tags)"
if [ -z "$VERSION" ]; then
echo "Could not parse version from git"
exit 1
fi
echo -e "<?php define(\"APP_VERSION\", \"$VERSION\");" > src/version
echo -e "* Version: \e[1m$VERSION\e[0m"