-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathdeploy.sh
More file actions
29 lines (23 loc) · 839 Bytes
/
deploy.sh
File metadata and controls
29 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
PARENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -pl :IF-parent -q -DforceStdout)
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -pl :IF -q -DforceStdout)
if [[ $PARENT_VERSION != "$BASE_VERSION" ]]; then
echo "IF-parent and IF versions mismatch"
exit 1
fi
if [[ $PARENT_VERSION != *-SNAPSHOT ]]; then
exit 0
fi
if ! mvn clean install -B; then
echo "Unable to build IF"
exit 1
fi
if ! mvn deploy -N -pl :IF-parent -P deploy -s ./.github/deployment/settings.xml -B \
-Dgpg.passphrase="$1" -Ddeploy.username="$2" -Ddeploy.password="$3"; then
echo "Unable to deploy IF-parent"
exit 1
fi
if ! mvn deploy -pl :IF -P deploy -s ./.github/deployment/settings.xml -B \
-Dgpg.passphrase="$1" -Ddeploy.username="$2" -Ddeploy.password="$3"; then
echo "Unable to deploy IF"
fi