gitlab-shell: 8.3.3 -> 8.4.1
This commit is contained in:
parent
625e66d879
commit
293a631081
|
@ -1,14 +1,14 @@
|
||||||
{ stdenv, ruby, bundler, fetchFromGitLab, go }:
|
{ stdenv, ruby, bundler, fetchFromGitLab, go }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "8.3.3";
|
version = "8.4.1";
|
||||||
name = "gitlab-shell-${version}";
|
name = "gitlab-shell-${version}";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = "gitlab-org";
|
owner = "gitlab-org";
|
||||||
repo = "gitlab-shell";
|
repo = "gitlab-shell";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1qapw0yvlw1nxjik7jpbbbl3yx299sfvdx67zsd5ai7bhk1gd8xl";
|
sha256 = "00jzrpdfqgrba2qi5ngc0g07p7gmip7my563hw542gg8l88d27xq";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ruby bundler go ];
|
buildInputs = [ ruby bundler go ];
|
||||||
|
|
|
@ -1,23 +1,41 @@
|
||||||
diff --git a/go/internal/config/config.go b/go/internal/config/config.go
|
diff --git a/go/internal/config/config.go b/go/internal/config/config.go
|
||||||
index c57b4de..88cfc95 100644
|
index 435cb29..078c1df 100644
|
||||||
--- a/go/internal/config/config.go
|
--- a/go/internal/config/config.go
|
||||||
+++ b/go/internal/config/config.go
|
+++ b/go/internal/config/config.go
|
||||||
@@ -27,7 +27,7 @@ func New() (*Config, error) {
|
@@ -2,7 +2,6 @@ package config
|
||||||
}
|
|
||||||
cfg.RootDir = dir
|
|
||||||
|
|
||||||
- configBytes, err := ioutil.ReadFile(path.Join(cfg.RootDir, configFile))
|
import (
|
||||||
+ configBytes, err := ioutil.ReadFile("/run/gitlab/shell-config.yml")
|
"io/ioutil"
|
||||||
if err != nil {
|
- "os"
|
||||||
return nil, err
|
"path"
|
||||||
}
|
|
||||||
|
yaml "gopkg.in/yaml.v2"
|
||||||
|
@@ -26,16 +25,13 @@ type Config struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func New() (*Config, error) {
|
||||||
|
- dir, err := os.Getwd()
|
||||||
|
- if err != nil {
|
||||||
|
- return nil, err
|
||||||
|
- }
|
||||||
|
+ dir := "/run/gitlab"
|
||||||
|
|
||||||
|
return NewFromDir(dir)
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFromDir(dir string) (*Config, error) {
|
||||||
|
- return newFromFile(path.Join(dir, configFile))
|
||||||
|
+ return newFromFile(path.Join(dir, "shell-config.yml"))
|
||||||
|
}
|
||||||
|
|
||||||
|
func newFromFile(filename string) (*Config, error) {
|
||||||
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
|
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
|
||||||
index 1452f95..2b40327 100644
|
index 57c70f5..700569b 100644
|
||||||
--- a/lib/gitlab_shell.rb
|
--- a/lib/gitlab_shell.rb
|
||||||
+++ b/lib/gitlab_shell.rb
|
+++ b/lib/gitlab_shell.rb
|
||||||
@@ -180,7 +180,8 @@ class GitlabShell
|
@@ -187,7 +187,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
|
||||||
end
|
|
||||||
|
|
||||||
|
args = [executable, gitaly_address, json_args]
|
||||||
# We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
|
# We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
|
||||||
- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
|
- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
|
||||||
+ # Except we don't, because we're already in the right directory on nixos!
|
+ # Except we don't, because we're already in the right directory on nixos!
|
||||||
|
|
Loading…
Reference in a new issue