#!/bin/bash
set -e

if [[ \"${bamboo_version_tag}\" != \"dev\" ]]
then
    ${bamboo_capability_system_builder_mvn3_Maven_3}/bin/mvn \
                    -f ${bamboo_build_working_directory}/pom.xml \
                    versions:set  \
                    -DnewVersion=${bamboo_version_tag}

    ${bamboo_capability_system_builder_mvn3_Maven_3}/bin/mvn \
                    -f ${bamboo_build_working_directory}/pom.xml \
                    -B clean deploy \
                    -e -DdeployAtEnd=true \
                    -Dmaven.wagon.http.ssl.insecure=true \
                    -Dmaven.wagon.http.ssl.allowall=true \
                    -Dmaven.wagon.http.ssl.ignore.validity.dates=true \
                    -DaltDeploymentRepository=iqser_release::default::https://nexus.iqser.com/repository/gin4-platform-releases
fi