forked from splunk/splunk-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy
executable file
·34 lines (29 loc) · 1.04 KB
/
deploy
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
30
31
32
33
34
#!/usr/bin/env bash
declare -r scriptDirectory="$(dirname $(readlink -e $0))"
declare -r scriptName="$(basename $0)"
declare -r version="1.6.5"
if [[ $# -ne 1 ]]; then
echo 1>&2 "Usage: ${scriptName} {local|staging||production}"
fi
case $1 in
local)
declare -r url="file:///${HOME}/.m2/repository/"
declare -r repositoryId=""
;;
staging)
declare -r url="http://stg-artifactory:8081/artifactory/devplat-staging/"
declare -r repositoryId="splunk-staging-artifactory"
;;
production)
declare -r url="https://splunk.artifactoryonline.com/splunk/ext-releases-local/"
declare -r repositoryId="splunk-production-artifactory"
;;
esac
cd "${scriptDirectory}"
mvn deploy:deploy-file -Ddescription="The Splunk SDK for Java" -Dfile=dist/splunk-${version}.jar \
-DgroupId=com.splunk -DartifactId=splunk -Dversion=${version}.0 -Dpackaging=jar \
-Djavadoc=dist/splunk-${version}-javadoc.jar \
-Dsources=dist/splunk-${version}-sources.jar \
-DrepositoryId="${repositoryId}" \
-DupdateReleaseInfo=true \
-Durl="${url}"