PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/jgitflow-maven-plugin/src/it/projects/hotfix-finish-version-only-change/prebuild.groovy

https://bitbucket.org/atlassian/jgit-flow
Groovy | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 3339c935484c846a55871a97138e3c24 MD5 | raw file
Possible License(s): Apache-2.0
  1. import com.atlassian.maven.plugins.jgitflow.it.FinishScriptHelper
  2. import org.eclipse.jgit.api.CreateBranchCommand
  3. import org.eclipse.jgit.api.Git
  4. try
  5. {
  6. helper = new FinishScriptHelper(basedir, localRepositoryPath, context)
  7. FinishScriptHelper.Gits gits = helper.createAndCloneRepo("1.0","1.1-SNAPSHOT","1.0.1","hotfix/")
  8. Git localGit = gits.local;
  9. localGit.checkout().setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK).setCreateBranch(true).setStartPoint("origin/hotfix/1.0.1").setName("hotfix/1.0.1").call()
  10. return true
  11. }
  12. catch (Exception e)
  13. {
  14. System.err.println(e.getMessage())
  15. return false;
  16. }