-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-release.sh
executable file
·58 lines (51 loc) · 1.31 KB
/
deploy-release.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
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
fatal()
{
echo "fatal: $1" 1>&2
exit 1
}
if [ -z "${MAVEN_CENTRAL_USERNAME}" ]
then
fatal "MAVEN_CENTRAL_USERNAME is not set."
fi
if [ -z "${MAVEN_CENTRAL_PASSWORD}" ]
then
fatal "MAVEN_CENTRAL_PASSWORD is not set."
fi
(cat <<EOF
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>io7m</id>
<properties>
<gpg.useagent>true</gpg.useagent>
<gpg.keyname>github-ci-maven-rsa-key</gpg.keyname>
<io7m.deployment>true</io7m.deployment>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
</servers>
</settings>
EOF
) > "$HOME/.m2/settings.xml" || fatal "could not update $HOME/.m2/settings.xml"
exec mvn \
-Dio7m.release=true \
-Dio7m.deployment=true \
--batch-mode \
--strict-checksums \
-DskipTests=true \
-DskipITs=true deploy