Browse Source

Add argument to skip fetching the latest remote source

pull/218/head
Mitchell Cash 9 months ago
parent
commit
c76ac9d903
No account linked to committer's email address
2 changed files with 10 additions and 0 deletions
  1. 5
    0
      RELEASE_NOTES
  2. 5
    0
      bin/gbuild

+ 5
- 0
RELEASE_NOTES View File

@@ -1,3 +1,8 @@
2019-05-23
----------

- Add `--skip-fetch` argument that skips fetching the latest remote source

2019-05-13
----------


+ 5
- 0
bin/gbuild View File

@@ -196,6 +196,9 @@ OptionParser.new do |opts|
opts.on("-o", "--cache-read-only", "only use existing cache files, do not update them") do |v|
@options[:cache_ro] = v
end
opts.on("--skip-fetch", "skip fetching the latest git objects and refs from the remote source") do |v|
@options[:skip_fetch] = v
end
end.parse!

if !ENV["USE_LXC"] and !ENV["USE_DOCKER"] and !ENV["USE_VBOX"] and !File.exist?("/dev/kvm")
@@ -288,6 +291,8 @@ build_desc["remotes"].each do |remote|
commit = sanitize(remote["commit"], remote["commit"])
unless File.exist?("inputs/#{dir}")
system!("git init inputs/#{dir}")
end
if !@options[:skip_fetch]
system!("cd inputs/#{dir} && git fetch --update-head-ok #{sanitize_path(remote["url"], remote["url"])} +refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*")
system!("cd inputs/#{dir} && git checkout -q #{commit}")
system!("cd inputs/#{dir} && git submodule update --init --recursive --force")

Loading…
Cancel
Save