<commit_before>namespace :whatsopt do
  namespace :delivery do

    DLVDIR= "~/DELIVERY"
    EXPORT= "#{DLVDIR}/export"
  
    desc 'Pack of TEIS web application delivery'
    task :pack, [:version] do |t, args|
      tag = args[:version]
      if (tag == 'HEAD')
        puts "Packing WhatsOpt latest..."
      else
        puts "Packing WhatsOpt #{tag}..."
      end
      basename   = "whatsopt-#{tag}"
      repository = "ssh://designlab@endymion/d/designlab/gitrepos/WhatsOpt.git"
      sh "rm -rf #{EXPORT}"
      sh "rm -f #{DLVDIR}/#{basename}.tar.gz"
      sh "git clone --recursive #{repository} #{EXPORT}/#{tag} --branch #{tag}"

      sh "git archive -o #{DLVDIR}/#{basename}.tar.gz #{tag}"
      sh "rm -rf #{EXPORT}"
    end
  
    desc 'Unpack of TEIS web application delivery'
    task :unpack, [:version] do |t, args|
      tag = args[:version]
      basename = "whatsopt-#{tag}"
      sh "rm -rf #{DLVDIR}/#{basename}"
      sh "tar xvfz #{DLVDIR}/#{basename}.tar.gz"
    end
  end
end<commit_msg>use git-archive-all to deploy on ether<commit_after>namespace :whatsopt do
  namespace :delivery do

    DLVDIR= "~/DELIVERY"
    EXPORT= "#{DLVDIR}/export"
  
    desc 'Pack of TEIS web application delivery'
    task :pack, [:version] do |t, args|
      tag = args[:version]
      if (tag == 'HEAD')
        puts "Packing WhatsOpt latest..."
      else
        puts "Packing WhatsOpt #{tag}..."
      end
      basename   = "whatsopt-#{tag}"
      repository = "ssh://designlab@endymion/d/designlab/gitrepos/WhatsOpt.git"
      sh "rm -rf #{EXPORT}"
      sh "rm -f #{DLVDIR}/#{basename}.tar.gz"
      sh "git clone --recursive #{repository} #{EXPORT}/#{tag} --branch #{tag}"
      #sh "git archive -o #{DLVDIR}/#{basename}.tar.gz #{tag}"
      # Use git-archive-all : https://pypi.org/project/git-archive-all/
      sh "cd #{EXPORT}/#{tag}; git-archive-all --prefix='' #{DLVDIR}/#{basename}.tar.gz"
      sh "rm -rf #{EXPORT}"
    end
  
    desc 'Unpack of TEIS web application delivery'
    task :unpack, [:version] do |t, args|
      tag = args[:version]
      basename = "whatsopt-#{tag}"
      sh "rm -rf #{DLVDIR}/#{basename}"
      sh "tar xvfz #{DLVDIR}/#{basename}.tar.gz"
    end
  end
end
{'fraction_non_alphanumeric': 0.17148014440433212, 'fraction_numerical': 0.0, 'mean_word_length': 2.519047619047619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '320408', 'n_tokens_mistral': 791, 'n_tokens_neox': 786, 'n_words': 207}