]> git.pld-linux.org Git - packages/gitlab-runner.git/commitdiff
branch preserver: keep previous behavior for tags
authorElan Ruusamäe <glen@delfi.ee>
Mon, 14 Nov 2016 21:11:42 +0000 (23:11 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 14 Nov 2016 21:11:42 +0000 (23:11 +0200)
branch-preserver.patch
gitlab-ci-multi-runner.spec

index 40e18d2a6752e9f4b3f4481424311979dd0ef761..12ba9ef15f2ae7298f3d7e2718f2333c7be09c28 100644 (file)
@@ -1,11 +1,17 @@
---- gitlab-ci-multi-runner-1.7.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/shells/abstract.go~  2016-10-21 23:19:09.000000000 +0300
-+++ gitlab-ci-multi-runner-1.7.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/shells/abstract.go   2016-10-24 11:51:14.842526005 +0300
-@@ -99,7 +99,7 @@
+diff --git a/shells/abstract.go b/shells/abstract.go
+index e4ae2b0..f3cb56b 100644
+--- a/shells/abstract.go
++++ b/shells/abstract.go
+@@ -99,7 +99,11 @@ func (b *AbstractShell) writeFetchCmd(w ShellWriter, build *common.Build, projec
  
  func (b *AbstractShell) writeCheckoutCmd(w ShellWriter, build *common.Build) {
        w.Notice("Checking out %s as %s...", build.Sha[0:8], build.RefName)
 -      w.Command("git", "checkout", "-f", "-q", build.Sha)
-+      w.Command("git", "checkout", "-fq", "-B", build.RefName, build.Sha)
++      if build.Tag {
++              w.Command("git", "checkout", "-f", "-q", build.Sha)
++      } else {
++              w.Command("git", "checkout", "-fq", "-B", build.RefName, build.Sha)
++      }
  }
  
  func (b *AbstractShell) cacheFile(build *common.Build, userKey string) (key, file string) {
index 9e786f356b09a2fda3903427eddc41679f530905..ee94d34025e187662823ee49263105c819ea9ba2 100644 (file)
@@ -11,7 +11,7 @@
 Summary:       The official GitLab CI runner written in Go
 Name:          gitlab-ci-multi-runner
 Version:       1.7.1
-Release:       2
+Release:       3
 License:       MIT
 Group:         Development/Building
 Source0:       https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
@@ -28,7 +28,7 @@ Patch1:               branch-preserver.patch
 URL:           https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
 BuildRequires: git-core
 %{?with_bindata:BuildRequires: go-bindata >= 3.0.7-1.a0ff2567}
-BuildRequires: golang >= 1.4
+BuildRequires: golang >= 1.6
 BuildRequires: rpmbuild(macros) >= 1.647
 Requires(post,preun):  /sbin/chkconfig
 Requires(post,preun,postun):   systemd-units >= 38
@@ -73,7 +73,7 @@ mv gitlab-ci-multi-runner-* src/%{import_path}
 cd src/%{import_path}
 
 %{!?with_bindata:%patch0 -p1}
-%patch1 -p5
+%patch1 -p1
 
 %if %{with bindata}
 install -d out/docker
This page took 0.12232 seconds and 4 git commands to generate.