Skip to content

Commit 1959a6d

Browse files
authored
Merge pull request #1088 from camilamacedo86/fix-golden
fix: remove tmp/vendor.v1.tgz to ensure that it will work always
2 parents 8a87fcb + 0a3c076 commit 1959a6d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

common.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ function download_vendor_archive {
166166
archive_name="vendor.v1.tgz"
167167
archive_download_url="https://storage.googleapis.com/kubebuilder-vendor/$archive_name"
168168
archive_path="$tmp_root/$archive_name"
169-
if [ ! -f $archive_path ]; then
170-
header_text "downloading vendor archive $archive_path"
171-
curl -sL ${archive_download_url} -o "$archive_path"
169+
header_text "checking the path $archive_path to download the $archive_name"
170+
if [ -f $archive_path ]; then
171+
header_text "removing file which exists"
172+
rm $archive_path
172173
fi
174+
header_text "downloading vendor archive from $archive_download_url"
175+
curl -sL ${archive_download_url} -o "$archive_path"
173176
}
174177

175178
function restore_go_deps {

0 commit comments

Comments
 (0)