Skip to content

Commit

Permalink
run console through docker
Browse files Browse the repository at this point in the history
  • Loading branch information
wr0ngway committed Jul 21, 2021
1 parent 63a54bc commit 3ad434b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 12 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'yaml'
require 'open-uri'

APP = YAML.load(File.read(".app.yml"), filename: ".app.yml", symbolize_names: true)
APP = YAML.load(File.read(".app.yml"), symbolize_names: true)
TMP_DIR = "tmp"
HELMV2_DIR = "#{TMP_DIR}/helmv2"
HELM_PKG_DIR = "#{TMP_DIR}/packaged-chart"
Expand Down Expand Up @@ -218,11 +218,17 @@ task :changelog do
end

task :console do
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
require "bundler/setup"
require APP[:name]
require "pry"
Pry.start
local = get_var(:local, prompt: false, required: false, default: false)
if local
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
require "bundler/setup"
require APP[:name]
require "pry"
Pry.start
else
Rake::Task["build_development"].invoke
sh "docker run -it kubetruth:development console"
end
end

file "#{CLIENT_DIR}/Gemfile" => "openapi.yml" do
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case $action in

console)
echo "Starting console"
exec rake console
LOCAL=true exec rake console
;;

test)
Expand Down

0 comments on commit 3ad434b

Please sign in to comment.