Commit 864e004a authored by OUGHDI's avatar OUGHDI
Browse files

Merge branch 'develop' of...

Merge branch 'develop' of https://github.com/lutece-platform/lutece-build-plugin-releaser into develop
Merge branch
parents ea6f6c20 5fd73ed3
......@@ -409,7 +409,9 @@ public class SiteService
component.addReleaseComment( strComment );
}
else
if ( component.getLastAvailableVersion( ) != null
if ( component.getLastAvailableVersion( ) != null
&& component.getTargetVersion( )!=null
&& component.getLastAvailableVersion( )!=null
&& ReleaserUtils.compareVersion( component.getTargetVersion( ), component.getLastAvailableVersion( ) ) < 0 )
{
String [ ] arguments = {
......
......@@ -325,6 +325,8 @@ public class WorkflowReleaseContextService implements IWorkflowReleaseContextSer
commandResult.getLog( ).append( mergeResult.getMergeStatus( ) );
}
ReleaserUtils.logEndAction( context, " Merge DEVELOP/MASTER" );
//BACK to Branch DEVELOP after merge
GitUtils.checkoutRepoBranch( git, GitUtils.DEVELOP_BRANCH, commandResult );
// PROGRESS 25%
commandResult.setProgressValue( commandResult.getProgressValue( ) + 10 );
......@@ -382,6 +384,8 @@ public class WorkflowReleaseContextService implements IWorkflowReleaseContextSer
String strLogin = context.getReleaserUser( ).getCredential( context.getReleaserResource( ).getRepoType( ) ).getLogin( );
String strPassword = context.getReleaserUser( ).getCredential( context.getReleaserResource( ).getRepoType( ) ).getPassword( );
IVCSResourceService cvsService = CVSFactoryService.getService( context.getComponent( ).getRepoType( ) );
// Checkout Develop before prepare
cvsService.checkoutDevelopBranch( context, locale );
try
{
......
......@@ -447,10 +447,14 @@ public class ReleaserUtils
public static int compareVersion( String strVersion1, String strVersion2 )
{
ComparableVersion cVersion1 = new ComparableVersion( strVersion1 );
ComparableVersion cVersion2 = new ComparableVersion( strVersion2 );
if( strVersion1!=null && strVersion2!=null)
{
ComparableVersion cVersion1 = new ComparableVersion( strVersion1 );
ComparableVersion cVersion2 = new ComparableVersion( strVersion2 );
return cVersion1.compareTo( cVersion2 );
return cVersion1.compareTo( cVersion2 );
}
return -1;
}
......
......@@ -21,10 +21,10 @@
<div class="col-xs-12 col-sm-5 col-md-6">
<h4>
<#if release_history.component??>
<p class="lead">Version ${release_history.component.targetVersion} <strong><#if (release_history.commandResult.status==1 ||release_history.commandResult.errorType==0 ) ><span class="text-success"> <i class="fa fa-check fa-fw"></i> OK</span> <#else><span class="text-danger"> <i class="fa fa-remove fa-fw"></i> KO </span></#if></strong></p>
<p class="lead">Version ${release_history.component.targetVersion!''} <strong><#if (release_history.commandResult.status==1 ||release_history.commandResult.errorType==0 ) ><span class="text-success"> <i class="fa fa-check fa-fw"></i> OK</span> <#else><span class="text-danger"> <i class="fa fa-remove fa-fw"></i> KO </span></#if></strong></p>
<p><i class="fa fa-calendar fa-fw"></i> ${release_history.commandResult.dateBegin?string('dd.MM.yyyy HH:mm:ss')}-${release_history.commandResult.dateEnd?string('HH:mm:ss')} <p>
<#else>
<p class="lead">Version ${release_history.site.nextReleaseVersion} <strong><#if release_history.commandResult.status==1 && !release_history.commandResult.running> <span class="text-success"> <i class="fa fa-check fa-fw"></i> OK</span> <#else><span class="text-danger"> <i class="fa fa-remove fa-fw"></i> KO </span></#if></strong></p>
<p class="lead">Version ${release_history.site.nextReleaseVersion!''} <strong><#if release_history.commandResult.status==1 && !release_history.commandResult.running> <span class="text-success"> <i class="fa fa-check fa-fw"></i> OK</span> <#else><span class="text-danger"> <i class="fa fa-remove fa-fw"></i> KO </span></#if></strong></p>
<p><i class="fa fa-calendar fa-fw"></i> ${release_history.commandResult.dateBegin?string('dd.MM.yyyy HH:mm:ss')}-${release_history.commandResult.dateEnd?string('HH:mm:ss')} </p>
</#if>
</h4>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment