From 09e393c41a2bb25f2562e60ff3dee32df610d295 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 10 Nov 2017 14:21:11 +1100 Subject: [PATCH] [#13] Fixed branch switch running too late. --- src/ArtefactTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ArtefactTrait.php b/src/ArtefactTrait.php index 48c7257..6c1a503 100644 --- a/src/ArtefactTrait.php +++ b/src/ArtefactTrait.php @@ -182,14 +182,14 @@ public function artefact($remote, array $opts = [ */ protected function prepareArtefact() { + $this->gitSwitchToBranch($this->src, $this->artefactBranch, true); + if (!empty($this->gitignoreFile)) { $this->replaceGitignore($this->gitignoreFile, $this->src); } $this->removeSubRepos($this->src); - $this->gitSwitchToBranch($this->src, $this->artefactBranch, true); - $result = $this->gitCommit($this->src, $this->message); if ($this->showChanges) {