Skip to content

Commit

Permalink
Add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Jul 9, 2019
1 parent 168ada2 commit 80ef2df
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

if [ ! -e settings.xml ]; then
echo "No 'settings.xml' file found.";
cat <<EOF
Example:
<settings>
<servers>
<server>
<id>clojars</id>
<username>username</username>
<password>password</password>
</server>
</servers>
</settings>
EOF
fi

if [ ! -e pom.xml ]; then
echo "pom.xml file does not exit, you can generate it executing: clojure -Spom";
exit 1;
fi

if [ ! $1 ]; then
echo "Filename not provided."
exit 1;
fi

if [ ! -e $1 ]; then
echo "Filename '$1' does not exists"
exit 1;
fi

mvn -s settings.xml deploy:deploy-file -Dfile=$1 -DrepositoryId=clojars -Durl=https://clojars.org/repo -DpomFile=pom.xml

0 comments on commit 80ef2df

Please sign in to comment.