Skip to content

Commit

Permalink
Merge pull request #8 from taiyoh/feature/dockerfile
Browse files Browse the repository at this point in the history
add Dockerfile and build task
  • Loading branch information
taiyoh authored Mar 8, 2020
2 parents e8fccb1 + 270535c commit 8efd601
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM scratch

ARG version

ADD ./pkg/${version}/toyhose_linux_amd64/toyhose .

CMD [ "./toyhose" ]
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GIT_VERSION=$(shell git describe --tags)
CURRENT_REVISION=$(shell git rev-parse --short HEAD)
LDFLAGS="-s -w -X main.version=$(GIT_VERSION) -X main.commit=$(CURRENT_REVISION)"

.PHONY: test install
.PHONY: test install build release docker

install:
cd cmd/toyhose && go install
Expand All @@ -21,3 +21,6 @@ build:

release:
ghr -n $(GIT_VERSION) $(GIT_VERSION) pkg/$(GIT_VERSION)/dist

docker: build
docker build -t taiyoh/toyhose:$(GIT_VERSION) --build-arg version=$(GIT_VERSION) .
6 changes: 5 additions & 1 deletion delivery_stream_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ func (s *DeliveryStreamService) Create(ctx context.Context, input []byte) (*fire
arn := s.arnName(*i.DeliveryStreamName)
dsCtx, dsCancel := context.WithCancel(context.Background())
recordCh := make(chan *deliveryRecord, 128)
dsType := "DirectPut"
if i.DeliveryStreamType != nil {
dsType = *i.DeliveryStreamType
}
ds := &deliveryStream{
arn: arn,
deliveryStreamName: *i.DeliveryStreamName,
deliveryStreamType: *i.DeliveryStreamType,
deliveryStreamType: dsType,
recordCh: recordCh,
closer: dsCancel,
destDesc: &firehose.DestinationDescription{},
Expand Down

0 comments on commit 8efd601

Please sign in to comment.