1 | |
package fr.paris.lutece.plugins.releaser.service; |
2 | |
|
3 | |
import java.util.Locale; |
4 | |
|
5 | |
import org.tmatesoft.svn.core.SVNException; |
6 | |
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; |
7 | |
import org.tmatesoft.svn.core.wc.SVNWCUtil; |
8 | |
|
9 | |
import fr.paris.lutece.plugins.releaser.business.WorkflowReleaseContext; |
10 | |
import fr.paris.lutece.plugins.releaser.util.ReleaserUtils; |
11 | |
import fr.paris.lutece.plugins.releaser.util.svn.ReleaseSvnCommitClient; |
12 | |
import fr.paris.lutece.plugins.releaser.util.svn.SvnUtils; |
13 | |
import fr.paris.lutece.portal.service.util.AppLogService; |
14 | |
|
15 | 1 | public class SvnMavenPrepareUpdateRemoteRepository implements IMavenPrepareUpdateRemoteRepository |
16 | |
{ |
17 | |
|
18 | |
|
19 | |
@Override |
20 | |
public void updateDevelopBranch(String strLocalBasePath,WorkflowReleaseContext context, Locale locale, String strMessage ) |
21 | |
{ |
22 | |
|
23 | 0 | ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(context.getReleaserUser( ).getSvnComponentAccountLogin( ), |
24 | 0 | context.getReleaserUser( ).getSvnComponentAccountPassword( )); |
25 | |
|
26 | 0 | ReleaseSvnCommitClient commitClient = new ReleaseSvnCommitClient( authManager, |
27 | 0 | SVNWCUtil.createDefaultOptions( false ) ); |
28 | |
|
29 | |
try |
30 | |
{ |
31 | 0 | SvnUtils.doCommit( strLocalBasePath, strMessage, commitClient ); |
32 | |
} |
33 | 0 | catch( Exception e ) |
34 | |
{ |
35 | |
|
36 | 0 | AppLogService.error( e ); |
37 | 0 | ReleaserUtils.addTechnicalError( context.getCommandResult( ), e.getMessage( ), e ); |
38 | 0 | } |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | 0 | } |
45 | |
|
46 | |
@Override |
47 | |
public void updateReleaseBranch(String strLocalBasePath, WorkflowReleaseContext context, Locale locale) |
48 | |
{ |
49 | |
|
50 | |
|
51 | 0 | } |
52 | |
|
53 | |
@Override |
54 | |
public void rollbackRelease(String strLocalBasePath, WorkflowReleaseContext context, Locale locale) |
55 | |
{ |
56 | |
|
57 | 0 | } |
58 | |
|
59 | |
|
60 | |
|
61 | |
} |