Fix: gdk-reconfigure fails when symlink for .ruby-version file exists
[ruben@mbp ~/projects/gdk-ce (master *)]$ gdk reconfigure
(in /Users/ruben/projects/gdk-ce)
rm -f \
gitlab/config/gitlab.yml \
gitlab/config/database.yml \
gitlab/config/unicorn.rb \
gitlab/config/resque.yml \
gitlab-shell/config.yml \
redis/redis.conf \
Procfile
sed -e "s|/home/git|/Users/ruben/projects/gdk-ce|"\
gitlab/config/gitlab.yml.example > gitlab/config/gitlab.yml
port= support/edit-gitlab.yml gitlab/config/gitlab.yml
gitlab_shell:
sed "s|/home/git|/Users/ruben/projects/gdk-ce|" database.yml.example > gitlab/config/database.yml
cp gitlab/config/unicorn.rb.example.development gitlab/config/unicorn.rb
echo "listen '/Users/ruben/projects/gdk-ce/gitlab.socket'" >> gitlab/config/unicorn.rb
sed "s|/home/git|/Users/ruben/projects/gdk-ce|" redis/resque.yml.example > gitlab/config/resque.yml
command -v bundler > /dev/null || gem install bundler
sed -e "s|/home/git|/Users/ruben/projects/gdk-ce|"\
-e "s|^gitlab_url:.*|gitlab_url: http+unix://%2FUsers%2Fruben%2Fprojects%2Fgdk-ce%2Fgitlab.socket|"\
-e "s|/usr/bin/redis-cli|/usr/local/bin/redis-cli|"\
-e "s|^ socket: .*| socket: /Users/ruben/projects/gdk-ce/redis/redis.socket|"\
gitlab-shell/config.yml.example > gitlab-shell/config.yml
GOPATH=/Users/ruben/projects/gdk-ce/gitlab-workhorse go install gitlab.com/gitlab-org/gitlab-workhorse/...
ln -s /Users/ruben/projects/gdk-ce/gitlab/.ruby-version .ruby-version
ln: .ruby-version: File exists
make: *** [.ruby-version] Error 1
Merge request reports
Activity
Thanks @rdavila . I don't understand why this is needed though...
make
should see the symlink exists and skip theln -s
step. I will try to reproduce this.@rdavila could it be that you moved or renamed your GDK root directory?
@jacobvosmaer-gitlab yes!, I was about to post that, sorry for the noise, I'm going to update all the places that refers to the old dir since other things are broken now.
@rdavila this is not noise!
gdk reconfigure
should work after you moved the directory. Now I understand what happened. :)Will get back to this tomorrow.
@jacobvosmaer-gitlab thanks!
@rdavila I came up with another fix that matches how we regenerate other files during
gdk reconfigure
. Thanks for bringing the problem to my attention!Merged in 7cf410f1
thanks @jacobvosmaer-gitlab.