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

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

https://bitbucket.org/atlassian/jgit-flow
Groovy | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 4b1b6bc5b06212cb836a38833b205f3d 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.2-SNAPSHOT","1.1","release/")
  8. Git localGit = gits.local;
  9. localGit.checkout().setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK).setCreateBranch(true).setStartPoint("origin/release/1.1").setName("release/1.1").call()
  10. return true
  11. }
  12. catch (Exception e)
  13. {
  14. System.err.println(e.getMessage())
  15. return false;
  16. }