Fix git_hashtags with a / character (#6562)

* fix git_hashtags with / character

* bump version
This commit is contained in:
Cassandra Watergate
2022-01-06 16:01:33 +00:00
committed by GitHub
parent 5dcc02c6bd
commit c48385288a
2 changed files with 3 additions and 3 deletions

View File

@@ -726,11 +726,11 @@ def download
# No git branch specified, just a git commit or tag
if @pkg.git_branch.nil? || @pkg.git_branch.empty?
abort("No Git branch, commit, or tag specified!").lightred if @pkg.git_hashtag.nil? || @pkg.git_hashtag.empty?
cachefile = CREW_CACHE_DIR + filename + @pkg.git_hashtag + '.tar.xz'
cachefile = CREW_CACHE_DIR + filename + @pkg.git_hashtag.gsub('/', '_') + '.tar.xz'
puts "cachefile is #{cachefile}".orange if @opt_verbose
# Git branch and git commit specified
elsif ( ! @pkg.git_hashtag.nil? || ! @pkg.git_hashtag.empty ) and ( ! @pkg.git_branch.nil? || ! @pkg.git_branch.empty?)
cachefile = CREW_CACHE_DIR + filename + @pkg.git_branch.gsub(/[^0-9A-Za-z.\-]/, '_') + '_' + @pkg.git_hashtag + '.tar.xz'
cachefile = CREW_CACHE_DIR + filename + @pkg.git_branch.gsub(/[^0-9A-Za-z.\-]/, '_') + '_' + @pkg.git_hashtag.gsub('/', '_') + '.tar.xz'
puts "cachefile is #{cachefile}".orange if @opt_verbose
# Git branch specified, without a specific git commit.
else

View File

@@ -1,6 +1,6 @@
# Defines common constants used in different parts of crew
CREW_VERSION = '1.20.6'
CREW_VERSION = '1.20.7'
ARCH_ACTUAL = `uname -m`.chomp
# This helps with virtualized builds on aarch64 machines