ci-scripts: update Maven home settings.xml config

v2
pabloFuente 2025-11-11 11:41:48 +01:00
parent 7207a1591c
commit d320dd590d
1 changed files with 8 additions and 7 deletions

View File

@ -236,13 +236,14 @@ if [[ "${CHECK_AND_PREPARE_KURENTO_SNAPSHOT}" == true ]]; then
KURENTO_VERSION=$(awk -F'[<>]' '/<version.kurento>/ {print $3}' pom.xml) KURENTO_VERSION=$(awk -F'[<>]' '/<version.kurento>/ {print $3}' pom.xml)
if [[ "${KURENTO_VERSION}" == *"-SNAPSHOT" ]] && [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then if [[ "${KURENTO_VERSION}" == *"-SNAPSHOT" ]] && [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then
echo "Kurento version is a SNAPSHOT: ${KURENTO_VERSION}" echo "Kurento version is a SNAPSHOT: ${KURENTO_VERSION}"
mkdir -p /etc/maven mkdir -p ~/.m2
chmod -R 777 /etc/maven curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/kurento-snapshots.xml -o ~/.m2/settings.xml
pushd /etc/maven sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" ~/.m2/settings.xml
rm -f settings.xml if [[ -n "${MAVEN_HOME:-}" ]]; then
curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/kurento-snapshots.xml -o settings.xml cp ~/.m2/settings.xml "${MAVEN_HOME}/conf/settings.xml"
sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" settings.xml elif [[ -n "${M2_HOME:-}" ]]; then
ln -sf /etc/maven/settings.xml ~/.m2/settings.xml # Link to user maven settings cp ~/.m2/settings.xml "${M2_HOME}/conf/settings.xml"
fi
popd popd
else else
echo "Kurento version is not a SNAPSHOT: ${KURENTO_VERSION}" echo "Kurento version is not a SNAPSHOT: ${KURENTO_VERSION}"