jenkins: ensure valid locale is set before running
This prevents the dreaded "Content is not allowed in prolog" errors when running gradle. C.UTF-8 is a Debian thing that is not supported everywhere including Java. fdroid/basebox#9
This commit is contained in:
parent
6d842b8429
commit
ecb6987cda
|
@ -18,6 +18,11 @@ if [ -z $WORKSPACE ]; then
|
|||
export WORKSPACE=`pwd`
|
||||
fi
|
||||
|
||||
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
|
||||
export LC_ALL=en_US.UTF-8
|
||||
echo "Forcing locale to $LC_ALL"
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@ if [ -z $WORKSPACE ]; then
|
|||
WORKSPACE=`pwd`
|
||||
fi
|
||||
|
||||
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
|
||||
export LC_ALL=en_US.UTF-8
|
||||
echo "Forcing locale to $LC_ALL"
|
||||
fi
|
||||
|
||||
# make sure that no VirtualBox processes are left running
|
||||
cleanup_all() {
|
||||
set +e
|
||||
|
|
|
@ -17,6 +17,11 @@ if [ -z $WORKSPACE ]; then
|
|||
export WORKSPACE=`pwd`
|
||||
fi
|
||||
|
||||
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
|
||||
export LC_ALL=en_US.UTF-8
|
||||
echo "Forcing locale to $LC_ALL"
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
|
|
Loading…
Reference in New Issue