public void updateContractProject ( String projectName , Path rootStubsFolder ) { File clonedRepo = this . gitContractsRepo . clonedRepo ( this . stubRunnerOptions . stubRepositoryRoot ) ; GitStubDownloaderProperties properties = new GitStubDownloaderProperties ( this . stubRunnerOptions . stubRepositoryRoot , this . stubRunnerOptions ) ; copyStubs ( projectName , rootStubsFolder , clonedRepo ) ; GitRepo gitRepo = new GitRepo ( clonedRepo , properties ) ; String msg = StubRunnerPropertyUtils . getProperty ( this . stubRunnerOptions . getProperties ( ) , GIT_COMMIT_MESSAGE ) ; GitRepo . CommitResult commit = gitRepo . commit ( clonedRepo , commitMessage ( projectName , msg ) ) ; if ( commit == GitRepo . CommitResult . EMPTY ) { log . info ( "There were no changes to commit. Won't push the changes" ) ; return ; } String attempts = StubRunnerPropertyUtils . getProperty ( this . stubRunnerOptions . getProperties ( ) , GIT_ATTEMPTS_NO_PROP ) ; int intAttempts = StringUtils . hasText ( attempts ) ? Integer . parseInt ( attempts ) : DEFAULT_ATTEMPTS_NO ; String wait = StubRunnerPropertyUtils . getProperty ( this . stubRunnerOptions . getProperties ( ) , GIT_WAIT_BETWEEN_ATTEMPTS ) ; long longWait = StringUtils . hasText ( wait ) ? Long . parseLong ( wait ) : DEFAULT_WAIT_BETWEEN_ATTEMPTS ; tryToPushCurrentBranch ( clonedRepo , gitRepo , intAttempts , longWait ) ; }
Merges the folder with stubs with the project containing contracts .