Skip to content

Commit

Permalink
Add template files to dep graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Jul 4, 2021
1 parent ee67691 commit 7b98b3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,25 @@ deps:
@go mod vendor

SOURCE_FILES = $(shell find lib internal public cmd -type f -name "*.go")
TEMPLATE_FILES = $(shell find template -path template/test -prune -o -type f -name "*.yaml")

$(PATHINSTBIN)/%: $(SOURCE_FILES)
$(PATHINSTBIN)/%: $(SOURCE_FILES) $(TEMPLATE_FILES)
@go build $(GO_FLAGS) -tags "$(TAGS)" -ldflags "$(LD_FLAGS) $(VER_FLAGS)" -o $@ ./cmd/$*

$(APPS): %: $(PATHINSTBIN)/%

TOOLS = benthos_config_gen benthos_docs_gen
tools: $(TOOLS)

$(PATHINSTTOOLS)/%: $(SOURCE_FILES)
$(PATHINSTTOOLS)/%: $(SOURCE_FILES) $(TEMPLATE_FILES)
@go build $(GO_FLAGS) -tags "$(TAGS)" -ldflags "$(LD_FLAGS) $(VER_FLAGS)" -o $@ ./cmd/tools/$*

$(TOOLS): %: $(PATHINSTTOOLS)/%

SERVERLESS = benthos-lambda
serverless: $(SERVERLESS)

$(PATHINSTSERVERLESS)/%: $(SOURCE_FILES)
$(PATHINSTSERVERLESS)/%: $(SOURCE_FILES) $(TEMPLATE_FILES)
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build $(GO_FLAGS) -tags "$(TAGS)" -ldflags "$(LD_FLAGS) $(VER_FLAGS)" -o $@ ./cmd/serverless/$*
@zip -m -j $@.zip $@
Expand Down
5 changes: 4 additions & 1 deletion template/outputs/discord.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ type: output
status: experimental
categories: [ Services, Social ]
summary: Writes messages to a Discord channel.
description: This output POSTs messages to the `/channels/{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication. The format of a message must be a JSON object matching the [Discord API message type](https://discord.com/developers/docs/resources/channel#message-object).
description: |
This output POSTs messages to the `/channels/{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication.
If the format of a message is a JSON object matching the [Discord API message type](https://discord.com/developers/docs/resources/channel#message-object) then it is sent directly, otherwise an object matching the API type is created with the content of the message added as a string.
fields:
- name: channel_id
Expand Down
5 changes: 4 additions & 1 deletion website/docs/components/outputs/discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ output:
</TabItem>
</Tabs>
This output POSTs messages to the `/channels/{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication. The format of a message must be a JSON object matching the [Discord API message type](https://discord.com/developers/docs/resources/channel#message-object).
This output POSTs messages to the `/channels/{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication.

If the format of a message is a JSON object matching the [Discord API message type](https://discord.com/developers/docs/resources/channel#message-object) then it is sent directly, otherwise an object matching the message type is created with the content of the messages added as a string.


## Fields

Expand Down

0 comments on commit 7b98b3f

Please sign in to comment.