Skip to content

Commit 64c0d5f

Browse files
Open source release
1 parent 86f7159 commit 64c0d5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+17195
-1
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
Dockerfile
3+
.buildkite
4+
.git

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
vendor/
16+
17+
build/
18+
19+
.vscode

Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM golang:1.14 as builder
2+
ENV SRC github.com/segmentio/topicctl
3+
ENV CGO_ENABLED=0
4+
5+
ARG VERSION
6+
RUN test -n "${VERSION}"
7+
8+
COPY . /go/src/${SRC}
9+
RUN cd /go/src/${SRC} && make install VERSION=${VERSION}
10+
11+
FROM alpine:3
12+
13+
RUN apk update && apk add bash curl
14+
COPY --from=builder /go/bin/topicctl /usr/local/bin/topicctl

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Segment.io, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ifndef VERSION
2+
VERSION := $(shell git describe --tags --always --dirty="-dev")
3+
endif
4+
5+
PKG := ./cmd/topicctl
6+
BIN := build/topicctl
7+
8+
LDFLAGS := -ldflags='-X "main.version=$(VERSION)"'
9+
10+
.PHONY: topicctl
11+
topicctl:
12+
go build -o $(BIN) $(LDFLAGS) $(PKG)
13+
14+
.PHONY: install
15+
install:
16+
go install $(LDFLAGS) $(PKG)
17+
18+
.PHONY: vet
19+
vet:
20+
$Qgo vet ./...
21+
22+
.PHONY: test
23+
test: vet
24+
$Qgo test -count 1 -p 1 ./...
25+
26+
.PHONY: clean
27+
clean:
28+
rm -Rf build

0 commit comments

Comments
 (0)