forked from clarin-eric/base_style
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maven-deploy.sh
executable file
·45 lines (38 loc) · 1.23 KB
/
maven-deploy.sh
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
35
36
37
38
39
40
41
42
43
44
45
#/bin/sh
set -e
PLUGIN="org.apache.maven.plugins:maven-deploy-plugin:2.8.2"
REPOSITORY_URL_SNAPSHOT=https://nexus.clarin.eu/content/repositories/clarin-snapshot
REPOSITORY_URL_STABLE=https://nexus.clarin.eu/content/repositories/Clarin
#from env
#STYLE_VERSION=0.1.2
if echo "${STYLE_VERSION}" | grep -q "SNAPSHOT"
then
echo "Detected SNAPSHOT version"
REPOSITORY="CLARIN-Snapshot"
REPOSITORY_URL=${REPOSITORY_URL_SNAPSHOT}
else
echo "Detected NON-SNAPSHOT version"
REPOSITORY="CLARIN"
REPOSITORY_URL=${REPOSITORY_URL_STABLE}
#only deploy on tag
if [ -z "${TRAVIS_TAG}" ]
then
echo "TRAVIS_TAG variable not set, skipping deployment"
exit 0
else
echo "Tag: ${TRAVIS_TAG}"
fi
fi
echo "Repository: ${REPOSITORY}"
echo "URL: ${REPOSITORY_URL}"
mvn ${PLUGIN}:deploy-file \
-Durl=${REPOSITORY_URL} \
-DrepositoryId=${REPOSITORY} \
-Dfile=target-css-with-bootstrap/base-style-${STYLE_VERSION}.jar \
-Dclassifier=css-with-bootstrap \
-Dversion=${STYLE_VERSION} \
-DpomFile=pom.xml \
-Dfiles=target-less-with-bootstrap/base-style-${STYLE_VERSION}-less-with-bootstrap.jar,target-less-without-bootstrap/base-style-${STYLE_VERSION}-less-without-bootstrap.jar \
-Dclassifiers=less-with-bootstrap,less-without-bootstrap \
-Dtypes=jar,jar \
$@