Skip to content

Commit

Permalink
Add support for netgo package build for Linux operating system (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
misraved committed May 9, 2024
1 parent 561bb30 commit a783d0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
15 changes: 3 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,13 @@ builds:
- GOPRIVATE=github.com/turbot
goos:
- linux
goarch:
- amd64
- arm64
id: "steampipe-linux"
binary: "{{ .ProjectName }}.plugin"

- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPRIVATE=github.com/turbot
goos:
- darwin

goarch:
- amd64
- arm64
id: "steampipe-darwin"

id: "steampipe"
binary: "{{ .ProjectName }}.plugin"
flags:
- -tags=netgo
Expand Down
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
STEAMPIPE_INSTALL_DIR ?= ~/.steampipe

# Determine the operating system
OS := $(shell uname)

# Check if the OS is Mac OS/Darwin
ifeq ($(OS),Darwin)
BUILD_TAGS = netgo
endif

BUILD_TAGS = netgo
install:
go build -o $(STEAMPIPE_INSTALL_DIR)/plugins/hub.steampipe.io/plugins/turbot/aws@latest/steampipe-plugin-aws.plugin -tags "$(BUILD_TAGS)" *.go
go build -o $(STEAMPIPE_INSTALL_DIR)/plugins/hub.steampipe.io/plugins/turbot/aws@latest/steampipe-plugin-aws.plugin -tags "${BUILD_TAGS}" *.go

0 comments on commit a783d0e

Please sign in to comment.