[packages/gitlab-ci-multi-runner] branch preserver: keep previous behavior for tags

glen glen at pld-linux.org
Mon Nov 14 22:11:58 CET 2016


commit dfe9a1790967e47aa286667c5782f28ab92dfccd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Nov 14 23:11:42 2016 +0200

    branch preserver: keep previous behavior for tags

 branch-preserver.patch      | 14 ++++++++++----
 gitlab-ci-multi-runner.spec |  6 +++---
 2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/gitlab-ci-multi-runner.spec b/gitlab-ci-multi-runner.spec
index 9e786f3..ee94d34 100644
--- a/gitlab-ci-multi-runner.spec
+++ b/gitlab-ci-multi-runner.spec
@@ -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
diff --git a/branch-preserver.patch b/branch-preserver.patch
index 40e18d2..12ba9ef 100644
--- a/branch-preserver.patch
+++ b/branch-preserver.patch
@@ -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) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ci-multi-runner.git/commitdiff/dfe9a1790967e47aa286667c5782f28ab92dfccd



More information about the pld-cvs-commit mailing list