forked from libretime/libretime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·27 lines (24 loc) · 763 Bytes
/
build.sh
File metadata and controls
executable file
·27 lines (24 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash -e
composer install
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
# travis should release tarballs with a pre-written VERSION file
# at some stage
if [ ! -f VERSION ]; then
folder_name=$(basename `pwd`)
echo "tarball install from folder ${folder_name}" > VERSION
fi
fi