Skip to content

Commit

Permalink
chore: add ci build of go-component test resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcrm committed Nov 13, 2023
1 parent 2bd2e06 commit 1fb5389
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ test-resources: ## *CI ONLY* Prepares CI test containers
go-component-from := integration/test_resources/cdk/go-component/bin/go-component
go-component-to := ~/.config/lacework/components/go-component/go-component

.PHONY: cdk-go-component-ci
cdk-go-component-ci: ## Creates a go-component for development
scripts/prepare_test_resources.sh go_component
mkdir -p $(shell dirname $(go-component-to))
echo '{"name":"go-component","description":"(dev-mode) A go-component for development","type":"CLI_COMMAND","artifacts":[],"breadcrumbs":{},"version":"0.0.0-dev"}' \
> $(shell dirname $(go-component-to))/.dev
ifeq (x86_64, $(shell uname -m))
cp $(go-component-from)-$(shell uname -s | tr '[:upper:]' '[:lower:]')-amd64 $(go-component-to)
else ifeq (arm64, $(shell uname -m))
cp $(go-component-from)-$(shell uname -s | tr '[:upper:]' '[:lower:]')-arm64 $(go-component-to)
else
cp $(go-component-from)-$(shell uname -s | tr '[:upper:]' '[:lower:]')-386 $(go-component-to)
endif

.PHONY: cdk-go-component
cdk-go-component: install-cli ## Creates a go-component for development
scripts/prepare_test_resources.sh go_component
Expand Down

0 comments on commit 1fb5389

Please sign in to comment.