Skip to content

Commit cc6571d

Browse files
fix: remove breaking change from gorelase installation in alpine (#109)
* fix: remove brekaing change from gorelase installation in alpine * fix: updating test to fix * fix: make sure to install curl in Alpine only if not present
1 parent b12e789 commit cc6571d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.circleci/test-deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
- alpine_install_curl
7979
- go/install-goreleaser:
8080
shell: sh
81+
int-test-goreleaser-install-alpine-no-curl:
82+
executor: alpine
83+
steps:
84+
- go/install-goreleaser:
85+
shell: sh
8186
int-test-goreleaser-install-pinned-version:
8287
executor: ubuntu_machine
8388
steps:
@@ -260,6 +265,8 @@ workflows:
260265
executor: [go, go_arm, mac, ubuntu_machine, ubuntu_machine_arm, win2022_bash, win2022_cmd, win2022_powershell]
261266
- int-test-goreleaser-install-alpine:
262267
filters: *filters
268+
- int-test-goreleaser-install-alpine-no-curl:
269+
filters: *filters
263270
- int-test-goreleaser-install-pinned-version:
264271
filters: *filters
265272
- int-test-goreleaser-release:
@@ -312,6 +319,7 @@ workflows:
312319
- int-test-vm-arm64
313320
- int-test-goreleaser-install
314321
- int-test-goreleaser-install-alpine
322+
- int-test-goreleaser-install-alpine-no-curl
315323
- int-test-goreleaser-install-pinned-version
316324
- int-test-goreleaser-release
317325
context: orb-publisher

src/scripts/install-goreleaser.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -euo pipefail
44

5+
function alpine_install_curl() {
6+
apk add curl
7+
}
8+
59
function get_os() {
610
local os
711
os=$(uname -o)
@@ -73,6 +77,15 @@ extract_goreleaser() {
7377
fi
7478
}
7579

80+
if grep alpinelinux /etc/os-release; then
81+
if which curl; then
82+
echo curl found in alpine
83+
else
84+
echo Installing curl in alpine
85+
alpine_install_curl
86+
fi
87+
fi
88+
7689
if ! which goreleaser &>/dev/null; then
7790
echo "Installing goreleaser..."
7891
architecture="$(get_architecture)"

0 commit comments

Comments
 (0)