2021-12-09 00:11:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-16 15:01:17 +00:00
|
|
|
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
|
|
|
|
|
2021-12-09 00:11:38 +00:00
|
|
|
VERSION="$(git describe --tags)"
|
|
|
|
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
echo "Could not parse version from git"
|
2021-12-17 11:51:29 +00:00
|
|
|
exit 0
|
2021-12-09 00:11:38 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "<?php define(\"APP_VERSION\", \"$VERSION\");" > src/version
|
2021-12-11 00:44:01 +00:00
|
|
|
echo -e "* Version: \e[1m$VERSION\e[0m"
|
2021-12-09 00:11:38 +00:00
|
|
|
|