Tom Page d7edaa5eaf
ACS-4464 Always build application when build or prepare are called.
If build is called then we definitely should be building the application. When prepare is called then we want to
prevent further builds running if the application doesn't compile.
2023-01-24 10:57:37 +00:00

29 lines
723 B
Bash

#!/usr/bin/env bash
echo "=========================== Starting Build Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
if [[ -n ${BUILD_PROFILES} ]]; then
PROFILES="${BUILD_PROFILES}"
elif [[ "${REQUIRES_LOCAL_IMAGES}" == "true" ]]; then
PROFILES="-Pbuild-docker-images -Pags"
else
PROFILES="-Pags"
fi
if [[ "${REQUIRES_INSTALLED_ARTIFACTS}" == "true" ]]; then
PHASE="install"
else
PHASE="package"
fi
mvn -B -V $PHASE -DskipTests -Dmaven.javadoc.skip=true $PROFILES $BUILD_OPTIONS
popd
set +vex
echo "=========================== Finishing Build Script =========================="