...

Text file src/github.com/lestrrat-go/jwx/Makefile

Documentation: github.com/lestrrat-go/jwx

     1.PHONY: generate realclean cover viewcover test lint check_diffs imports tidy
     2generate: 
     3	@go generate
     4	@$(MAKE) generate-jwa generate-jwe generate-jwk generate-jws generate-jwt
     5
     6generate-%:
     7	@echo "> Generating for $(patsubst generate-%,%,$@)"
     8	@go generate $(shell pwd -P)/$(patsubst generate-%,%,$@)
     9
    10realclean:
    11	rm coverage.out
    12
    13test-cmd:
    14	go test -v -race $(TESTOPTS)
    15
    16test:
    17	$(MAKE) TESTOPTS=./... test-cmd
    18	$(MAKE) -f $(PWD)/Makefile -C examples test-cmd
    19	$(MAKE) -f $(PWD)/Makefile -C bench/performance test-cmd
    20
    21cover-cmd:
    22	$(MAKE) test-cmd 
    23	$(MAKE) -f $(PWD)/Makefile -C examples TESTOPTS= test-cmd
    24	$(MAKE) -f $(PWD)/Makefile -C bench/performance TESTOPTS= test-cmd
    25	$(MAKE) -f $(PWD)/Makefile -C cmd/jwx TESTOPTS= test-cmd
    26	@# This is NOT cheating. tools to generate code, and tools to
    27	@# run tests don't need to be included in the final result.
    28	@cat coverage.out.tmp | grep -v "internal/jose" | grep -v "internal/jwxtest" | grep -v "internal/cmd" > coverage.out
    29	@rm coverage.out.tmp
    30
    31cover:
    32	$(MAKE) cover-stdlib
    33
    34cover-stdlib:
    35	$(MAKE) cover-cmd TESTOPTS="-coverpkg=./... -coverprofile=coverage.out.tmp ./..."
    36
    37cover-goccy:
    38	$(MAKE) cover-cmd TESTOPTS="-tags jwx_goccy -coverpkg=./... -coverprofile=coverage.out.tmp ./..."
    39
    40cover-es256k:
    41	$(MAKE) cover-cmd TESTOPTS="-tags jwx_es256k -coverpkg=./... -coverprofile=coverage.out.tmp ./..."
    42
    43cover-all:
    44	$(MAKE) cover-cmd TESTOPTS="-tags jwx_goccy,jwx_es256k -coverpkg=./... -coverprofile=coverage.out.tmp ./..."
    45
    46smoke-cmd:
    47	$(MAKE) test-cmd
    48	$(MAKE) -f $(PWD)/Makefile -C examples test-cmd
    49	$(MAKE) -f $(PWD)/Makefile -C bench/performance test-cmd
    50	$(MAKE) -f $(PWD)/Makefile -C cmd/jwx test-cmd
    51
    52smoke:
    53	$(MAKE) smoke-stdlib
    54
    55smoke-stdlib:
    56	$(MAKE) smoke-cmd TESTOPTS="-short ./..."
    57
    58smoke-goccy:
    59	$(MAKE) smoke-cmd TESTOPTS="-short -tags jwx_goccy ./..."
    60
    61smoke-es256k:
    62	$(MAKE) smoke-cmd TESTOPTS="-short -tags jwx_es256k ./..."
    63
    64smoke-all:
    65	$(MAKE) smoke-cmd TESTOPTS="-short -tags jwx_goccy,jwx_es256k ./..."
    66
    67viewcover:
    68	go tool cover -html=coverage.out
    69
    70lint:
    71	golangci-lint run ./...
    72
    73check_diffs:
    74	./scripts/check-diff.sh
    75
    76imports:
    77	goimports -w ./
    78
    79tidy:
    80	./scripts/tidy.sh
    81

View as plain text