Skip to content

Commit 46a5518

Browse files
committed
adding a local install script
1 parent 898a1f8 commit 46a5518

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
missing_vars=()
2+
[[ -z "${CLOJARS_USERNAME}" ]] && missing_vars+=("CLOJARS_USERNAME")
3+
[[ -z "${CLOJARS_TOKEN}" ]] && missing_vars+=("CLOJARS_TOKEN")
4+
[[ -z "${JAVA_HOME}" ]] && missing_vars+=("JAVA_HOME")
5+
6+
if [[ ${#missing_vars[@]} -gt 0 ]]; then
7+
echo "Error: The following required environment variables are not set: ${missing_vars[*]}"
8+
echo "Create them at https://clojars.org/profile"
9+
exit 1
10+
fi
11+
12+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13+
VERSION=$(bash $SCRIPT_DIR/findVersion.sh)
14+
echo "Clojar Java $JAVA_HOME"
15+
echo "Clojar Version: $VERSION"
16+
17+
set -e
18+
cd bindings/java/
19+
mvn versions:set -DnewVersion=$VERSION --file pom.xml --no-transfer-progress
20+
mvn install
21+
cd ../../
22+
set -e

0 commit comments

Comments
 (0)