[packages/gitlab-ci-multi-runner] patch to git reset --hard instead of checkout

glen glen at pld-linux.org
Mon Oct 24 10:25:18 CEST 2016


commit c4affa20ae921634288a53895b1eabe8baa42637
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Oct 24 11:23:44 2016 +0300

    patch to git reset --hard instead of checkout
    
    fixes composer version detection
    
    https://github.com/composer/composer/issues/5432#issuecomment-255669875

 branch-preserver.patch      | 12 ++++++++++++
 gitlab-ci-multi-runner.spec |  2 ++
 2 files changed, 14 insertions(+)
---
diff --git a/gitlab-ci-multi-runner.spec b/gitlab-ci-multi-runner.spec
index 38a4ee9..b3255c0 100644
--- a/gitlab-ci-multi-runner.spec
+++ b/gitlab-ci-multi-runner.spec
@@ -21,6 +21,7 @@ Source1:	https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker
 Source2:	https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-arm.tar.xz
 # Source2-md5:	c0533c581624dcb33095f08f06e6a00b
 Patch0:		nodim_gz.patch
+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}
@@ -65,6 +66,7 @@ mv gitlab-ci-multi-runner-* src/%{import_path}
 cd src/%{import_path}
 
 %{!?with_bindata:%patch0 -p1}
+%patch1 -p5
 
 %if %{with bindata}
 install -d out/docker
diff --git a/branch-preserver.patch b/branch-preserver.patch
new file mode 100644
index 0000000..dc03087
--- /dev/null
+++ b/branch-preserver.patch
@@ -0,0 +1,12 @@
+--- gitlab-ci-multi-runner-1.6.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/shells/abstract.go~	2016-09-22 20:36:49.000000000 +0300
++++ gitlab-ci-multi-runner-1.6.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/shells/abstract.go	2016-10-24 11:05:20.385999188 +0300
+@@ -99,7 +99,8 @@
+ 
+ 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", "-q", build.Sha)
++	w.Command("git", "checkout", "-q", build.RefName)
++	w.Command("git", "reset", "--hard", "-q", 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/c4affa20ae921634288a53895b1eabe8baa42637



More information about the pld-cvs-commit mailing list