summaryrefslogtreecommitdiff
path: root/vendor/github.com/manifoldco/promptui/Makefile
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-10-07 16:58:53 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-11-13 15:40:06 +0100
commit8e4a42aa429c6dec0d5face7c69554d8a0677e96 (patch)
treebbfff77e7b32a8b46af6f57d42965a7751bec18e /vendor/github.com/manifoldco/promptui/Makefile
parent0b1a60ec27928a40ac827148c1517098612616bd (diff)
downloadpodman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.tar.gz
podman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.tar.bz2
podman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.zip
short-name aliasing
Add support for short-name aliasing. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/manifoldco/promptui/Makefile')
-rw-r--r--vendor/github.com/manifoldco/promptui/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/github.com/manifoldco/promptui/Makefile b/vendor/github.com/manifoldco/promptui/Makefile
new file mode 100644
index 000000000..078a5613a
--- /dev/null
+++ b/vendor/github.com/manifoldco/promptui/Makefile
@@ -0,0 +1,49 @@
+export GO111MODULE := on
+export PATH := ./bin:$(PATH)
+
+ci: bootstrap lint cover
+.PHONY: ci
+
+#################################################
+# Bootstrapping for base golang package and tool deps
+#################################################
+
+bootstrap:
+ curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0
+.PHONY: bootstrap
+
+mod-update:
+ go get -u -m
+ go mod tidy
+
+mod-tidy:
+ go mod tidy
+
+.PHONY: $(CMD_PKGS)
+.PHONY: mod-update mod-tidy
+
+#################################################
+# Test and linting
+#################################################
+# Run all the linters
+lint:
+ bin/golangci-lint run ./...
+.PHONY: lint
+
+test:
+ CGO_ENABLED=0 go test $$(go list ./... | grep -v generated)
+.PHONY: test
+
+COVER_TEST_PKGS:=$(shell find . -type f -name '*_test.go' | rev | cut -d "/" -f 2- | rev | grep -v generated | sort -u)
+$(COVER_TEST_PKGS:=-cover): %-cover: all-cover.txt
+ @CGO_ENABLED=0 go test -v -coverprofile=$@.out -covermode=atomic ./$*
+ @if [ -f $@.out ]; then \
+ grep -v "mode: atomic" < $@.out >> all-cover.txt; \
+ rm $@.out; \
+ fi
+
+all-cover.txt:
+ echo "mode: atomic" > all-cover.txt
+
+cover: all-cover.txt $(COVER_TEST_PKGS:=-cover)
+.PHONY: cover all-cover.txt