Skip to content

Commit

Permalink
Create deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyamosip authored Jun 29, 2020
1 parent 02cd278 commit 5aaab1e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

search_directory=$1
settings_file=$2
version=$3

echo "Attempting to publish all projects that matches version $settings_file with the settings as $version"
counter=0
find $search_directory/*/ -type f -name "pom.xml" | while read -r F
do
xmllint xmllint --nowarning --xpath '/*[local-name()="project"]/*[local-name()="version"]' $F | grep $version
if [ $? -eq 0 ] ; then
mvn deploy -DskipTests -s $settings_file -f $F
fi
done

0 comments on commit 5aaab1e

Please sign in to comment.