Skip to content
Snippets Groups Projects
Commit 0dba6dc8 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Add 'gdk' command wrapper

parent 05bf0c2a
No related branches found
No related tags found
1 merge request!174Add 'gdk' command wrapper and gem
Loading
Loading
@@ -43,3 +43,4 @@
/nginx/uwsgi_temp
/.gitlab-shell-bundle
/.gitlab-bundle
/gdk
# GitLab Development Kit cheat sheet
 
./run # Start everything
./run db # Start enough to run tests
./run app # Start GitLab, need './run db'
./gdk run # Start everything
./gdk run db # Start enough to run tests
./gdk run app # Start GitLab, need './run db'
 
make gitlab_repo=https://my-fork # Install everything
make update # Pull application changes from Git
make clean-config all # Delete and regenerate all config files created by GDK
./gdk install gitlab_repo=https://my-fork # Install everything
./gdk update # Pull application changes from Git
./gdk reconfigure # Delete and regenerate all config files created by GDK
 
# Development admin account: root / 5iveL!fe
#!/bin/sh
cat > gdk <<EOF
#!/bin/sh
export GDK_ROOT=$(pwd)
export GDK_INVOKED=\$0
exec /usr/bin/env ruby \$GDK_ROOT/gdk.rb "\$@"
EOF
chmod +x gdk
exec ./gdk install
env.sh 0 → 100644
export PATH=$(pwd)/bin/:$PATH
gdk.rb 0 → 100644
GDK_ROOT = ENV.delete('GDK_ROOT').to_s
PROGNAME = ENV.delete('GDK_INVOKED').to_s
def main
case ARGV.shift
when 'run'
system('./run', *ARGV, chdir: GDK_ROOT)
when 'install'
system('make', *ARGV, chdir: GDK_ROOT)
when 'update'
system('make', 'update', chdir: GDK_ROOT)
when 'reconfigure'
system('make', 'clean-config', 'all', chdir: GDK_ROOT)
when 'help'
puts File.read(File.join(GDK_ROOT, 'HELP')).gsub(/^\.\/gdk/, PROGNAME)
true
else
puts "Usage: #{PROGNAME} run|install|update|reconfigure|help [ARGS...]"
false
end
end
exit main
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