]> git.pld-linux.org Git - packages/gitlab-runner.git/commitdiff
patch to git reset --hard instead of checkout
authorElan Ruusamäe <glen@delfi.ee>
Mon, 24 Oct 2016 08:23:44 +0000 (11:23 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 24 Oct 2016 08:23:44 +0000 (11:23 +0300)
fixes composer version detection

https://github.com/composer/composer/issues/5432#issuecomment-255669875

branch-preserver.patch [new file with mode: 0644]
gitlab-ci-multi-runner.spec

diff --git a/branch-preserver.patch b/branch-preserver.patch
new file mode 100644 (file)
index 0000000..dc03087
--- /dev/null
@@ -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) {
index 38a4ee9b051e6b408a8920a064523853d92305f5..b3255c00e119e1d164cee80088c391a1a0424880 100644 (file)
@@ -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
This page took 0.07222 seconds and 4 git commands to generate.