mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Allow crew to handle git urls (#5933)
* Catch git urls in crew * bump version * simplify
This commit is contained in:
15
bin/crew
15
bin/crew
@@ -642,8 +642,9 @@ def download
|
||||
puts "No precompiled binary available for your platform, downloading source..."
|
||||
end
|
||||
|
||||
Dir.chdir CREW_BREW_DIR do
|
||||
@git = uri.scheme =~ /git/ ? true : false
|
||||
|
||||
Dir.chdir CREW_BREW_DIR do
|
||||
case File.basename(filename)
|
||||
# Sources that download with curl
|
||||
when /\.zip$/i, /\.(tar(\.(gz|bz2|xz|lz))?|tgz|tbz|tpxz|txz)$/i, /\.deb$/i, /\.AppImage$/i
|
||||
@@ -694,8 +695,16 @@ def download
|
||||
end
|
||||
return {source: source, filename: filename}
|
||||
|
||||
# Sources that download with git
|
||||
when /^SKIP$/i
|
||||
Dir.mkdir @extract_dir
|
||||
|
||||
# Source URLs which end with .git are git sources.
|
||||
when /\.git$/i
|
||||
@git = true
|
||||
end
|
||||
|
||||
# Handle git sources.
|
||||
if @git == true
|
||||
# Recall repository from cache if requested
|
||||
if CREW_CACHE_ENABLED
|
||||
if @pkg.git_branch.nil? || @pkg.git_branch.empty?
|
||||
@@ -748,8 +757,6 @@ def download
|
||||
system "sha256sum #{cachefile} > #{cachefile}.sha256"
|
||||
puts 'Git repo cached.'.lightgreen
|
||||
end
|
||||
when /^SKIP$/i
|
||||
Dir.mkdir @extract_dir
|
||||
end
|
||||
end
|
||||
return {source: source, filename: filename}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Defines common constants used in different parts of crew
|
||||
|
||||
CREW_VERSION = '1.11.6'
|
||||
CREW_VERSION = '1.11.7'
|
||||
|
||||
ARCH_ACTUAL = `uname -m`.strip
|
||||
# This helps with virtualized builds on aarch64 machines
|
||||
|
||||
Reference in New Issue
Block a user