Skip to content

Commit

Permalink
chore: add custom publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
JinDouang authored and Glama107 committed Nov 14, 2024
1 parent a9e921d commit af01221
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ publish() {
docker compose run --rm maven mvn -DrepositoryId=ode-$nexusRepository -DskipTests -Dmaven.test.skip=true --settings /var/maven/.m2/settings.xml deploy
}

publishNexus() {
version=`docker compose run --rm maven mvn $MVN_OPTS help:evaluate -Dexpression=project.version -q -DforceStdout`
level=`echo $version | cut -d'-' -f3`
case "$level" in
*SNAPSHOT) export nexusRepository='snapshots' ;;
*) export nexusRepository='releases' ;;
esac
docker compose run --rm maven mvn -DrepositoryId=ode-$nexusRepository -Durl=$repo -DskipTests -Dmaven.test.skip=true --settings /var/maven/.m2/settings.xml deploy
}

# Commands

for param in "$@"
Expand Down Expand Up @@ -176,6 +186,9 @@ do
publish)
publish
;;
publishNexus)
publishNexus
;;
formulaire)
formulaire:buildNode && formulaire:buildGradle
;;
Expand Down

0 comments on commit af01221

Please sign in to comment.