Sha256: 702fb80bb63330ec5c288a8c13dfa4fc0e9318f1a2be96f6ba5b333820c11665
Contents?: true
Size: 613 Bytes
Versions: 23
Compression:
Stored size: 613 Bytes
Contents
require 'fileutils' module PkgForge ## # Add source methods to Forge class Forge private Contract None => nil def prepare_source! dest = tmpdir(:build) dest_git = File.join(dest, '.git') dest_git_config = File.join(dest_git, 'config') run_local 'git submodule update --init' FileUtils.cp_r 'upstream/.', dest FileUtils.rm_r dest_git FileUtils.cp_r '.git/modules/upstream', dest_git new_config = File.readlines(dest_git_config).grep_v(/worktree =/).join File.open(dest_git_config, 'w') { |fh| fh << new_config } nil end end end
Version data entries
23 entries across 23 versions & 1 rubygems