Skip to content

Commit

Permalink
Merge pull request #23 from cli/skip-unsupported-platforms
Browse files Browse the repository at this point in the history
Fix building with go 1.16
  • Loading branch information
mislav committed Jun 8, 2022
2 parents 95edaf7 + 742c173 commit a6bb337
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build_and_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ if [ -n "$GH_EXT_BUILD_SCRIPT" ]; then
echo "invoking build script override $GH_EXT_BUILD_SCRIPT"
./"$GH_EXT_BUILD_SCRIPT" "$tag"
else
IFS=$'\n' read -d '' -r -a supported_platforms < <(go tool dist list) || true

for p in "${platforms[@]}"; do
goos="${p%-*}"
goarch="${p#*-}"
if [[ " ${supported_platforms[*]} " != *" ${goos}/${goarch} "* ]]; then
echo "warning: skipping unsupported platform $p" >&2
continue
fi
ext=""
if [ "$goos" = "windows" ]; then
ext=".exe"
Expand Down

0 comments on commit a6bb337

Please sign in to comment.