-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
156 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ cover.out | |
bibikoffi.toml | ||
bibikoffi | ||
myrmica-bibikoffi | ||
unsecure/ | ||
unsecured/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"Vendor": true, | ||
"Sort": [ "path", "line", "column", "linter", "severity"], | ||
"Disable": ["gas", "maligned"], | ||
"Exclude": ["unsecured/.*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
.PHONY: all | ||
|
||
default: clean test-unit validate build | ||
GOFILES := $(shell go list -f '{{range $$index, $$element := .GoFiles}}{{$$.Dir}}/{{$$element}}{{"\n"}}{{end}}' ./... | grep -v '/vendor/') | ||
|
||
default: clean checks test build-crossbinary | ||
|
||
test: clean | ||
go test -v -cover ./... | ||
|
||
dependencies: | ||
dep ensure | ||
dep ensure -v | ||
|
||
clean: | ||
rm -f cover.out | ||
|
||
build: | ||
go build | ||
|
||
validate: | ||
./_script/make.sh validate-gofmt validate-govet validate-golint validate-misspell | ||
checks: check-fmt | ||
gometalinter --vendor ./... | ||
|
||
test-unit: | ||
./_script/make.sh test-unit | ||
check-fmt: SHELL := /bin/bash | ||
check-fmt: | ||
diff -u <(echo -n) <(gofmt -d $(GOFILES)) | ||
|
||
clean: | ||
rm -f cover.out bibikoffi | ||
build-crossbinary: | ||
./_script/crossbinary |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -z "$VERSION" ]; then | ||
VERSION=$(git rev-parse HEAD) | ||
fi | ||
|
||
if [ -z "$DATE" ]; then | ||
DATE=$(date -u '+%Y-%m-%d_%I:%M:%S%p') | ||
fi | ||
|
||
VERSION_PACKAGE='github.com/containous/bibikoffi/meta' | ||
GO_BUILD_CMD="go build -ldflags" | ||
GO_BUILD_OPT="-s -w -X ${VERSION_PACKAGE}.Version=${VERSION} -X ${VERSION_PACKAGE}.BuildDate=${DATE}" | ||
|
||
rm -rf dist/ | ||
|
||
# Build binaries | ||
OS_PLATFORM_ARG=(linux windows darwin) | ||
OS_ARCH_ARG=(amd64) | ||
for OS in ${OS_PLATFORM_ARG[@]}; do | ||
BIN_EXT='' | ||
if [ "$OS" == "windows" ]; then | ||
BIN_EXT='.exe' | ||
fi | ||
for ARCH in ${OS_ARCH_ARG[@]}; do | ||
echo "Building binary for ${OS}/${ARCH}..." | ||
GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=0 ${GO_BUILD_CMD} "${GO_BUILD_OPT}" -o "dist/bibikoffi_${OS}-${ARCH}${BIN_EXT}" | ||
done | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.