Skip to content

Commit

Permalink
curl: use --retry=3 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed authored Oct 29, 2017
1 parent 9e2cbe9 commit 417c1f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build push test

TAG:=4
TAG:=5

build:
docker build -t testbed/vim:$(TAG) .
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ EOF
# The git package adds about 200MB+ to the image. So, no cloning.
url="https://github.com/$repo/archive/${tag}.tar.gz"
echo "Downloading $repo:$tag from $url"
curl -SL "$url" | tar zx --strip-components=1
curl --retry 3 -SL "$url" | tar zx --strip-components=1
else
cd "$BUILD_DIR"
fi
Expand Down Expand Up @@ -204,7 +204,7 @@ build() {
if grep -qF '#define NVIM_VERSION_PRERELEASE "-dev"' $versiondef_file \
&& grep -qF '/* #undef NVIM_VERSION_MEDIUM */' $versiondef_file ; then

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

0 comments on commit 417c1f7

Please sign in to comment.