mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
build: remove bazel files
This commit is contained in:
parent
cf25c6f3c8
commit
4eb92a02ab
9 changed files with 2 additions and 110 deletions
|
@ -1,3 +0,0 @@
|
|||
set race "on"|//...:%go_test
|
||||
fix unusedLoads|//...:__pkg__
|
||||
set timeout short|//...:%go_test
|
|
@ -1 +0,0 @@
|
|||
// Generated file, do not modify manually!
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"printf": {
|
||||
"exclude_files": {
|
||||
"/vendor/": "no need to vet third party code"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This command is used by bazel as the workspace_status_command
|
||||
# to implement build stamping with git information.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
GIT_COMMIT=$(git rev-parse --short HEAD)
|
||||
GIT_TAG=$(git describe --abbrev=0 --tags 2>/dev/null || echo "0.0.0")
|
||||
|
||||
# Prefix with STABLE_ so that these values are saved to stable-status.txt
|
||||
# instead of volatile-status.txt.
|
||||
# Stamped rules will be retriggered by changes to stable-status.txt, but not by
|
||||
# changes to volatile-status.txt.
|
||||
cat <<EOF
|
||||
STABLE_BUILD_GIT_COMMIT ${GIT_COMMIT-}
|
||||
STABLE_BUILD_GIT_TAG ${GIT_TAG-}
|
||||
EOF
|
|
@ -1,4 +0,0 @@
|
|||
internal
|
||||
build
|
||||
oci_staging
|
||||
ocibuilds
|
7
.bazelrc
7
.bazelrc
|
@ -1,7 +0,0 @@
|
|||
build --workspace_status_command .bazel/print-workspace-status.sh
|
||||
build --action_env=GO111MODULE=on
|
||||
|
||||
test --test_output=errors
|
||||
test --test_verbose_timeout_warnings
|
||||
|
||||
coverage --test_output=summary --keep_going --collect_code_coverage --combined_report=none
|
4
Makefile
4
Makefile
|
@ -32,9 +32,9 @@ covhtml:
|
|||
go tool cover -html=coverage.txt -o coverage.html
|
||||
|
||||
.PHONY: check
|
||||
check: .bazel/golangcilint.yaml
|
||||
check: ./golangcilint.yaml
|
||||
golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.26.0
|
||||
golangci-lint --config .bazel/golangcilint.yaml run --enable-all --build-tags extended ./cmd/... ./pkg/...
|
||||
golangci-lint --config ./golangcilint.yaml run --enable-all --build-tags extended ./cmd/... ./pkg/...
|
||||
|
||||
docs/docs.go:
|
||||
swag -v || go install github.com/swaggo/swag/cmd/swag
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
OS := $(shell uname -s | tr A-Z a-z)
|
||||
BINARY_PREFIX_DIRECTORY := $(OS)_amd64_stripped
|
||||
BAZEL=$(HOME)/bin/bazel
|
||||
BAZELOPTS= --repository_cache="$$HOME/.bzrepos" \
|
||||
--test_output=errors \
|
||||
--noshow_progress \
|
||||
--noshow_loading_progress
|
||||
|
||||
.PHONY: all
|
||||
all: build check
|
||||
|
||||
.PHONY: info
|
||||
.SILENT: info
|
||||
info:
|
||||
${BAZEL} build @io_bazel_rules_go//:go_info
|
||||
cat bazel-bin/external/io_bazel_rules_go/linux_amd64_stripped/go_info%/go_info_report
|
||||
|
||||
.PHONY: setup-base
|
||||
setup-base:
|
||||
swag -v || go get -u github.com/swaggo/swag/cmd/swag
|
||||
swag init -g pkg/api/routes.go
|
||||
|
||||
.PHONY: fmt-bazel
|
||||
fmt-bazel:
|
||||
${BAZEL} run //:buildozer
|
||||
${BAZEL} run //:buildifier
|
||||
|
||||
.PHONY: update-bazel
|
||||
update-bazel:
|
||||
${BAZEL} run //:gazelle -- update -build_tags minimal,extended
|
||||
|
||||
.PHONY: update-mod
|
||||
update-mod:
|
||||
${BAZEL} run //:gazelle -- update -from_file=go.mod
|
||||
|
||||
.PHONY: init
|
||||
init: setup-base update-bazel fmt-bazel
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
${BAZEL} build --define gotags=extended ${BAZELOPTS} //...
|
||||
${BAZEL} test --define gotags=extended ${BAZELOPTS} //...
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
${BAZEL} run //:golangcilint
|
||||
|
||||
.PHONY: bench
|
||||
.SILENT: bench
|
||||
bench:
|
||||
for i in $$(${BAZEL} query 'tests(//...)'); do \
|
||||
${BAZEL} run $$i -- -test.bench=.; \
|
||||
done
|
||||
|
||||
.PHONY: coverage
|
||||
.SILENT: coverage
|
||||
coverage:
|
||||
${BAZEL} coverage //...
|
||||
for c in $$(find ./bazel-out/ -name 'coverage.dat'); do \
|
||||
go tool cover --html=$$c -o /tmp/cover.html; \
|
||||
cat /tmp/cover.html | grep 'option value="file' | sed 's/<[^>]*>//g' | sed 's/^[ \t]*//'; \
|
||||
done
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
${BAZEL} clean
|
Loading…
Reference in a new issue