Skip to content
Snippets Groups Projects
Commit 6999b638 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Merge branch 'gitlab-shell-go-symlink' into 'master'

Move gitlab-shell to make Go development easier

See merge request !282
parents 66776ba9 63a91a7f
No related branches found
No related tags found
1 merge request!282Move gitlab-shell to make Go development easier
Pipeline #
/gitlab-shell/
/gitlab-shell
/.ssh/
/gitlab-satellites/
/repositories/
Loading
Loading
@@ -55,3 +56,4 @@
/gitaly/
/gitlab-workhorse/config.toml
/gitlab-workhorse/.cache
/go-gitlab-shell
gitlab_repo = https://gitlab.com/gitlab-org/gitlab-ce.git
gitlab_shell_repo = https://gitlab.com/gitlab-org/gitlab-shell.git
gitlab_shell_clone_dir = go-gitlab-shell/src/gitlab.com/gitlab-org/gitlab-shell
gitlab_workhorse_repo = https://gitlab.com/gitlab-org/gitlab-workhorse.git
gitlab_workhorse_clone_dir = gitlab-workhorse/src/gitlab.com/gitlab-org/gitlab-workhorse
gitaly_repo = https://gitlab.com/gitlab-org/gitaly.git
Loading
Loading
@@ -60,10 +61,14 @@ bundler:
 
# Set up gitlab-shell
 
gitlab-shell-setup: gitlab-shell/.git gitlab-shell/config.yml bundler .gitlab-shell-bundle gitlab-shell/.gitlab_shell_secret
gitlab-shell-setup: symlink-gitlab-shell ${gitlab_shell_clone_dir}/.git gitlab-shell/config.yml bundler .gitlab-shell-bundle gitlab-shell/.gitlab_shell_secret
if [ -x gitlab-shell/bin/compile ] ; then gitlab-shell/bin/compile; fi
 
gitlab-shell/.git:
git clone ${gitlab_shell_repo} gitlab-shell
symlink-gitlab-shell:
support/symlink-gitlab-shell gitlab-shell ${gitlab_shell_clone_dir}
${gitlab_shell_clone_dir}/.git:
git clone ${gitlab_shell_repo} ${gitlab_shell_clone_dir}
 
gitlab-shell/config.yml:
sed -e "s|/home/git|${gitlab_development_root}|"\
Loading
Loading
#!/usr/bin/env ruby
require 'fileutils'
require 'time'
def main(symlink, target)
return if File.symlink?(symlink)
if File.exist?(symlink)
# there is an old directory at the symlink location
FileUtils.mv(symlink, "#{symlink}.#{Time.now.iso8601}")
end
FileUtils.ln_s(target, symlink)
end
if ARGV.count != 2
abort "Usage: #{$0} SYMLINK TARGET"
end
main(*ARGV)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment