PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/atlassian/jgit-flow
Groovy | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 41a6888912266a1945311169d292a09a 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","my-feature","feature/")
  8. Git localGit = gits.local;
  9. localGit.checkout().setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK).setCreateBranch(true).setStartPoint("origin/feature/my-feature").setName("feature/my-feature").call()
  10. helper.comparePomFiles("expected-feature-pom.xml", "pom.xml")
  11. return true
  12. }
  13. catch (Exception e)
  14. {
  15. System.err.println(e.getMessage())
  16. return false;
  17. }