Class: Jets::Code::Copy::GitInline

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/code/copy/git_inline.rb

Instance Method Summary collapse

Methods inherited from Base

#always_keep, #always_remove, #extract_code, #git_info, #gitconfig, #remove_temp_files, #run, run, #save_gitinfo

Methods included from Util::Sh

#capture, #quiet_sh, #sh

Methods included from Util::Logging

#log

Methods included from Util::Git

#git?, #git_installed?

Instance Method Details

#create_temp_zipObject



3
4
5
6
7
8
9
10
11
# File 'lib/jets/code/copy/git_inline.rb', line 3

def create_temp_zip
  # Git add and commit to current repo. Affects the working dir but faster.
  if git_info.params[:git_dirty]
    quiet_sh "git add ."
    gitconfig
    quiet_sh "git commit -m 'commit for deploy' > /dev/null || true"
  end
  quiet_sh "git archive -o #{build_root}/stage/code-temp.zip HEAD"
end