enhance release script to check for required dependencies (ant, maven, mvn...)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@7236 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
parent
779526036a
commit
73a989fc97
@ -5,6 +5,17 @@ usage() {
|
|||||||
echo "this scripts requires the release version number"
|
echo "this scripts requires the release version number"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_dependency() {
|
||||||
|
local binary="${1}"
|
||||||
|
|
||||||
|
which "${binary}" > /dev/null
|
||||||
|
local status="${?}"
|
||||||
|
if [ ${status} -ne 0 ]; then
|
||||||
|
echo "missing dependency:${binary}"
|
||||||
|
exit ${status}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
version="${1}"
|
version="${1}"
|
||||||
|
|
||||||
if [ -z ${version} ]; then
|
if [ -z ${version} ]; then
|
||||||
@ -12,6 +23,10 @@ if [ -z ${version} ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_dependency ant
|
||||||
|
check_dependency maven
|
||||||
|
check_dependency mvn
|
||||||
|
|
||||||
echo "building release version ${version}"
|
echo "building release version ${version}"
|
||||||
|
|
||||||
pmd_top_dir="$(mktemp -d)"
|
pmd_top_dir="$(mktemp -d)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user