Skip to content

Commit 91e2f04

Browse files
ci: remove unnecessary TLS version specification in curl commands
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
1 parent 4db4a76 commit 91e2f04

14 files changed

Lines changed: 21 additions & 20 deletions

.taskfiles/scripts/install_act.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fi
8686

8787
# Execute remote installation script
8888
log "Fetching and executing official installation script"
89-
if ! curl "${ghAuthHeader[@]}" --proto '=https' --tlsv1.3 -fsSL "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- -b "${INSTALL_DIR}" "${VERSION}"; then
89+
if ! curl "${ghAuthHeader[@]}" -fsSL "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- -b "${INSTALL_DIR}" "${VERSION}"; then
9090
die "Installation failed. Check version or network connection."
9191
fi
9292

.taskfiles/scripts/install_actionlint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fi
8686

8787
# Execute remote installation script
8888
log "Fetching and executing official installation script"
89-
if ! curl "${ghAuthHeader[@]}" --proto '=https' --tlsv1.3 -fsSL "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- "${VERSION}" "${INSTALL_DIR}"; then
89+
if ! curl "${ghAuthHeader[@]}" -fsSL "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- "${VERSION}" "${INSTALL_DIR}"; then
9090
die "Installation failed. Check version or network connection."
9191
fi
9292

.taskfiles/scripts/install_azd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ log "Installing ${TOOL_NAME} (${VERSION}) to ${INSTALL_DIR}"
7777

7878
# Execute remote installation script
7979
log "Fetching and executing official installation script"
80-
if ! curl -fsSL --proto '=https' --tlsv1.3 "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- --version "${VERSION}" --install-folder "${INSTALL_DIR}" --symlink-folder "${INSTALL_DIR}"; then
80+
if ! curl -fsSL "${INSTALL_SCRIPT_URL}" | /bin/bash -s -- --version "${VERSION}" --install-folder "${INSTALL_DIR}" --symlink-folder "${INSTALL_DIR}"; then
8181
die "Installation failed. Check version or network connection."
8282
fi
8383

.taskfiles/scripts/install_bicep.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ else
112112
fi
113113

114114
releaseJson="${tempDir}/release.json"
115-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${apiUrl}" -o "${releaseJson}"; then
115+
if ! curl "${ghAuthHeader[@]}" -fsSL "${apiUrl}" -o "${releaseJson}"; then
116116
die "Failed to fetch release information. Check version or network connection."
117117
fi
118118

@@ -125,7 +125,7 @@ downloadUrl="$(jq -r --arg arch "${arch}" \
125125

126126
log "Downloading ${downloadUrl}"
127127
binaryPath="${tempDir}/${TOOL_NAME}"
128-
curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${downloadUrl}" -o "${binaryPath}" || die "Download failed"
128+
curl "${ghAuthHeader[@]}" -fsSL "${downloadUrl}" -o "${binaryPath}" || die "Download failed"
129129

130130
# Install binary
131131
log "Installing binary"

.taskfiles/scripts/install_ghalint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ else
114114
fi
115115

116116
releaseJson="${tempDir}/release.json"
117-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${apiUrl}" -o "${releaseJson}"; then
117+
if ! curl "${ghAuthHeader[@]}" -fsSL "${apiUrl}" -o "${releaseJson}"; then
118118
die "Failed to fetch release information. Check version or network connection."
119119
fi
120120

@@ -127,7 +127,7 @@ downloadUrl="$(jq -r --arg arch "${arch}" \
127127

128128
log "Downloading ${downloadUrl}"
129129
archivePath="${tempDir}/${TOOL_NAME}.tar.gz"
130-
curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${downloadUrl}" -o "${archivePath}" || die "Download failed"
130+
curl "${ghAuthHeader[@]}" -fsSL "${downloadUrl}" -o "${archivePath}" || die "Download failed"
131131

132132
# Extract binary
133133
log "Extracting archive"

.taskfiles/scripts/install_golangci-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fi
8686

8787
# Execute remote installation script
8888
log "Fetching and executing official installation script"
89-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${INSTALL_SCRIPT_URL}" | sh -s -- -b "${INSTALL_DIR}" "${VERSION}"; then
89+
if ! curl "${ghAuthHeader[@]}" -fsSL "${INSTALL_SCRIPT_URL}" | sh -s -- -b "${INSTALL_DIR}" "${VERSION}"; then
9090
die "Installation failed. Check version or network connection."
9191
fi
9292

.taskfiles/scripts/install_goreleaser.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ log "Installing ${TOOL_NAME} (${VERSION}) for ${os}/${arch} to ${INSTALL_DIR}"
107107

108108
# GitHub API authentication
109109
ghAuthHeader=(-H "Accept: application/vnd.github+json")
110+
ghAuthHeader+=(-H "User-Agent: ${TOOL_NAME}-installer")
110111
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
111112
ghAuthHeader+=(-H "Authorization: Bearer ${GITHUB_TOKEN}")
112113
fi
@@ -123,7 +124,7 @@ else
123124
fi
124125

125126
releaseJson="${tempDir}/release.json"
126-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${apiUrl}" -o "${releaseJson}"; then
127+
if ! curl "${ghAuthHeader[@]}" -fsSL "${apiUrl}" -o "${releaseJson}"; then
127128
die "Failed to fetch release information. Check version or network connection."
128129
fi
129130

@@ -136,7 +137,7 @@ downloadUrl="$(jq -r --arg os "${os}" --arg arch "${arch}" \
136137

137138
log "Downloading ${downloadUrl}"
138139
archivePath="${tempDir}/${TOOL_NAME}.tar.gz"
139-
curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${downloadUrl}" -o "${archivePath}" || die "Download failed"
140+
curl "${ghAuthHeader[@]}" -fsSL "${downloadUrl}" -o "${archivePath}" || die "Download failed"
140141

141142
# Extract binary
142143
log "Extracting archive"

.taskfiles/scripts/install_opentofu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ log "Installing ${TOOL_NAME} (${VERSION}) to ${INSTALL_DIR}"
7777

7878
# Execute remote installation script
7979
log "Fetching and executing official installation script"
80-
if ! curl -fsSL --proto '=https' --tlsv1.3 "${INSTALL_SCRIPT_URL}" | sh -s -- --install-method standalone --opentofu-version "${VERSION}" --install-path "${INSTALL_DIR}"; then
80+
if ! curl -fsSL "${INSTALL_SCRIPT_URL}" | sh -s -- --install-method standalone --opentofu-version "${VERSION}" --install-path "${INSTALL_DIR}"; then
8181
die "Installation failed. Check version or network connection."
8282
fi
8383

.taskfiles/scripts/install_pinact.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ else
110110
fi
111111

112112
releaseJson="${tempDir}/release.json"
113-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${apiUrl}" -o "${releaseJson}"; then
113+
if ! curl "${ghAuthHeader[@]}" -fsSL "${apiUrl}" -o "${releaseJson}"; then
114114
die "Failed to fetch release information. Check version or network connection."
115115
fi
116116

@@ -123,7 +123,7 @@ downloadUrl="$(jq -r --arg arch "${arch}" \
123123

124124
log "Downloading ${downloadUrl}"
125125
archivePath="${tempDir}/${TOOL_NAME}.tar.gz"
126-
curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${downloadUrl}" -o "${archivePath}" || die "Download failed"
126+
curl "${ghAuthHeader[@]}" -fsSL "${downloadUrl}" -o "${archivePath}" || die "Download failed"
127127

128128
# Extract binary
129129
log "Extracting archive"

.taskfiles/scripts/install_shellcheck.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ else
108108
fi
109109

110110
releaseJson="${tempDir}/release.json"
111-
if ! curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${apiUrl}" -o "${releaseJson}"; then
111+
if ! curl "${ghAuthHeader[@]}" -fsSL "${apiUrl}" -o "${releaseJson}"; then
112112
die "Failed to fetch release information. Check version or network connection."
113113
fi
114114

@@ -121,7 +121,7 @@ downloadUrl="$(jq -r --arg arch "${arch}" \
121121

122122
log "Downloading ${downloadUrl}"
123123
archivePath="${tempDir}/${TOOL_NAME}.tar.xz"
124-
curl "${ghAuthHeader[@]}" -fsSL --proto '=https' --tlsv1.3 "${downloadUrl}" -o "${archivePath}" || die "Download failed"
124+
curl "${ghAuthHeader[@]}" -fsSL "${downloadUrl}" -o "${archivePath}" || die "Download failed"
125125

126126
# Extract binary
127127
log "Extracting archive"

0 commit comments

Comments
 (0)