2015-06-29 22:49:16 +02:00
|
|
|
#!/bin/bash -e
|
2017-07-17 22:02:46 +02:00
|
|
|
composer install --no-dev
|
2015-02-19 16:01:09 +01:00
|
|
|
|
2017-03-09 16:12:44 +01:00
|
|
|
git_build=""
|
|
|
|
if [ -d .git ]; then
|
|
|
|
echo " * Building from Git"
|
|
|
|
git_build="y"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${git_build}" = "y" ]; then
|
|
|
|
git_version=`git tag --points-at HEAD`
|
|
|
|
echo " * Version from tag: ${git_version}"
|
|
|
|
if [ "${git_version}" = "" ]; then
|
|
|
|
git_version=`git rev-parse --short HEAD`
|
|
|
|
echo " * Overriding empty version with sha1 commit-ish: ${git_version}"
|
|
|
|
fi
|
|
|
|
echo ${git_version} > VERSION
|
|
|
|
else
|
|
|
|
# if no file was in tarball we create one letting the user know
|
2018-01-19 20:56:44 +01:00
|
|
|
# if you run in to this you should grab an enriched tarball built
|
|
|
|
# by travis. It already contains the VERSION file and also bundles
|
|
|
|
# all the PHP you vendors files making the install much faster on
|
|
|
|
# your part.
|
2017-03-09 16:12:44 +01:00
|
|
|
if [ ! -f VERSION ]; then
|
2018-01-19 20:56:44 +01:00
|
|
|
echo "could not detect version for VERSION file" > VERSION
|
2017-03-09 16:12:44 +01:00
|
|
|
fi
|
|
|
|
fi
|
2015-02-19 16:01:09 +01:00
|
|
|
|