forked from Domo42/stateless4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-staging.bat
77 lines (65 loc) · 2.76 KB
/
deploy-staging.bat
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@ECHO OFF
SET targetVersion=3.0.0
SET baseDir=%~dp0
SET targetUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2
REM SET targetUrl=file://v:\temp\repo
REM change version number in project tree
CALL mvn versions:set -DgenerateBackupPoms=false -DnewVersion=%targetVersion%
REM delete old signature files
del *.asc
call mvn clean install -DperformRelease=true -Dgpg.keyname=AA9AEC3C
SET pomAscFile=stateless4j-%targetVersion%.pom.asc
gpg -u AA9AEC3C --sign --detach-sign -o %pomAscFile% -a pom.xml
REM deploy base artifacts
ECHO.
ECHO -------- Deploy Binary ----------
ECHO.
call mvn deploy:deploy-file -Durl=%targetUrl% ^
-DrepositoryId=sonatype-nexus-staging ^
-Dfile=%baseDir%\target\stateless4j-%targetVersion%.jar ^
-DpomFile=%baseDir%\pom.xml ^
-Djavadoc=%baseDir%\target\stateless4j-%targetVersion%-javadoc.jar ^
-Dsources=%baseDir%\target\stateless4j-%targetVersion%-sources.jar
REM deploy signatures
ECHO.
ECHO -------- Deploy POM Signature ----------
ECHO.
call mvn deploy:deploy-file -Durl=%targetUrl% ^
-DrepositoryId=sonatype-nexus-staging ^
-Dfile=%baseDir%\%pomAscFile% ^
-DpomFile=%baseDir%\pom.xml ^
-Dpackaging=pom.asc
ECHO.
ECHO -------- Deploy lib Signature ----------
ECHO.
call mvn deploy:deploy-file -Durl=%targetUrl% ^
-DrepositoryId=sonatype-nexus-staging ^
-Dfile=%baseDir%\target\stateless4j-%targetVersion%.jar.asc ^
-DpomFile=%baseDir%\pom.xml ^
-Dpackaging=jar.asc
ECHO.
ECHO -------- Deploy JavaDoc Signature ----------
ECHO.
call mvn deploy:deploy-file -Durl=%targetUrl% ^
-DrepositoryId=sonatype-nexus-staging ^
-Dfile=%baseDir%\target\stateless4j-%targetVersion%-javadoc.jar.asc ^
-DpomFile=%baseDir%\pom.xml ^
-Dclassifier=javadoc ^
-Dpackaging=jar.asc
ECHO.
ECHO -------- Deploy Sources Signature ----------
ECHO.
call mvn deploy:deploy-file -Durl=%targetUrl% ^
-DrepositoryId=sonatype-nexus-staging ^
-Dfile=%baseDir%\target\stateless4j-%targetVersion%-sources.jar.asc ^
-DpomFile=%baseDir%\pom.xml ^
-Dclassifier=sources ^
-Dpackaging=jar.asc
GOTO:eof
:error
ECHO.
ECHO -----------------------------------
ECHO - Error performing project staging
ECHO -----------------------------------
ECHO.
EXIT /B