Skip to content

Commit 417c1f7

Browse files
authored
curl: use --retry=3 (Vimjas#39)
1 parent 9e2cbe9 commit 417c1f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: build push test
22

3-
TAG:=4
3+
TAG:=5
44

55
build:
66
docker build -t testbed/vim:$(TAG) .

scripts/install_vim.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ EOF
130130
# The git package adds about 200MB+ to the image. So, no cloning.
131131
url="https://github.com/$repo/archive/${tag}.tar.gz"
132132
echo "Downloading $repo:$tag from $url"
133-
curl -SL "$url" | tar zx --strip-components=1
133+
curl --retry 3 -SL "$url" | tar zx --strip-components=1
134134
else
135135
cd "$BUILD_DIR"
136136
fi
@@ -204,7 +204,7 @@ build() {
204204
if grep -qF '#define NVIM_VERSION_PRERELEASE "-dev"' $versiondef_file \
205205
&& grep -qF '/* #undef NVIM_VERSION_MEDIUM */' $versiondef_file ; then
206206

207-
head_info=$(curl -SL "https://api.github.com/repos/$repo/git/refs/heads/$tag")
207+
head_info=$(curl --retry 3 -SL "https://api.github.com/repos/$repo/git/refs/heads/$tag")
208208
if [ -n "$head_info" ]; then
209209
head_sha=$(echo "$head_info" | grep '"sha":' | cut -f4 -d\" | cut -b -7)
210210
if [ -n "$head_sha" ]; then

0 commit comments

Comments
 (0)