-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aba0448
commit 1362366
Showing
7 changed files
with
74 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ | |
/.gitlab-shell-bundle | ||
/.gitlab-bundle | ||
/gdk | ||
/*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# GitLab Development Kit cheat sheet | ||
|
||
./gdk run # Start everything | ||
./gdk run db # Start enough to run tests | ||
./gdk run app # Start GitLab, need './run db' | ||
gdk run # Start everything | ||
gdk run db # Start enough to run tests | ||
gdk run app # Start GitLab, needs 'gdk run db' | ||
|
||
./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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env ruby | ||
require 'fileutils' | ||
|
||
def main | ||
case ARGV.first | ||
when 'init' | ||
system(*%W(git clone -b gdk-cli https://gitlab.com/gitlab-org/gitlab-development-kit.git)) | ||
else | ||
$gdk_root = find_root(Dir.pwd) | ||
if $gdk_root.nil? | ||
puts "Could not find GDK_ROOT in the current directory or any of its parents." | ||
return false | ||
end | ||
puts "(in #{$gdk_root})" | ||
load(File.join($gdk_root, 'lib/gdk.rb')) | ||
GDK::main | ||
end | ||
end | ||
|
||
def find_root(current) | ||
if File.exist?(File.join(current, 'GDK_ROOT')) | ||
File.realpath(current) | ||
elsif File.realpath(current) == '/' | ||
nil | ||
else | ||
find_root(File.join(current, '..')) | ||
end | ||
end | ||
|
||
exit(main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# coding: utf-8 | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "gitlab-development-kit" | ||
spec.version = '0.1.0' | ||
spec.authors = ["Jacob Vosmaer"] | ||
spec.email = ["[email protected]"] | ||
|
||
spec.summary = %q{CLI for GitLab Development Kit} | ||
spec.description = %q{CLI for GitLab Development Kit.} | ||
spec.homepage = "https://gitlab.com/gitlab-org/gitlab-development-kit" | ||
spec.license = "MIT" | ||
spec.files = [] | ||
spec.executables = ['gdk'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module GDK | ||
PROGNAME = 'gdk' | ||
|
||
def self.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')) | ||
true | ||
else | ||
puts "Usage: #{PROGNAME} run|init|install|update|reconfigure|help [ARGS...]" | ||
false | ||
end | ||
end | ||
end |