PageRenderTime 29ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

/jgitflow-maven-plugin/src/it/projects/hotfix-finish-added-files/postbuild.groovy

https://bitbucket.org/atlassian/jgit-flow
Groovy | 25 lines | 16 code | 8 blank | 1 comment | 0 complexity | bcebc72378d1f304f248e825c11cd8a7 MD5 | raw file
Possible License(s): Apache-2.0
  1. import com.atlassian.jgitflow.core.JGitFlow
  2. import com.atlassian.jgitflow.core.util.GitHelper
  3. import com.atlassian.maven.plugins.jgitflow.it.FinishScriptHelper
  4. import static org.junit.Assert.assertTrue
  5. import static org.junit.Assert.assertFalse
  6. helper = new FinishScriptHelper(basedir, localRepositoryPath, context)
  7. flow = JGitFlow.getOrInit(basedir)
  8. flow.git().checkout().setName("master").call()
  9. helper.comparePomFiles("expected-master-pom.xml", "pom.xml")
  10. flow.git().checkout().setName("develop").call()
  11. File junkFile = new File(basedir, "junk.txt")
  12. assertTrue(junkFile.exists())
  13. //make sure hotfix delete was pushed
  14. branch = "hotfix/1.0.1";
  15. assertFalse("remote hotfix should not exist!", GitHelper.remoteBranchExists(flow.git(), branch));
  16. helper.comparePomFiles("expected-develop-pom.xml", "pom.xml")
  17. return true;