github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/Makefile (about)

     1  CF_DIAL_TIMEOUT ?= 15
     2  GINKGO_UNIT_TEST_NODES ?= 4
     3  GINKGO_INTEGRATION_TEST_NODES ?= 4
     4  LC_ALL = "en_US.UTF-8"
     5  
     6  CF_BUILD_VERSION ?= $$(cat ci/VERSION)
     7  CF_BUILD_SHA ?= $$(git rev-parse --short HEAD)
     8  CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d")
     9  GOSRC = $(shell find . -name "*.go" ! -name "*test.go" ! -name "*fake*")
    10  
    11  all : test build
    12  
    13  build : out/cf
    14  
    15  check_target_env :
    16  ifndef CF_API
    17  	$(error CF_API is undefined)
    18  endif
    19  ifndef CF_PASSWORD
    20  	$(error CF_PASSWORD is undefined)
    21  endif
    22  
    23  clean :
    24  	rm -r $(wildcard out/*)
    25  
    26  format :
    27  	go fmt ./...
    28  
    29  fly-windows-experimental : check_target_env
    30  	CF_CLI_EXPERIMENTAL=true CF_TEST_SUITE=./integration/experimental fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
    31  
    32  fly-windows-isolated : check_target_env
    33  	CF_TEST_SUITE=./integration/isolated fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
    34  
    35  fly-windows-plugin : check_target_env
    36  	CF_TEST_SUITE=./integration/plugin fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
    37  
    38  fly-windows-push : check_target_env
    39  	CF_TEST_SUITE=./integration/push fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
    40  
    41  i18n :
    42  	$(PWD)/bin/i18n-checkup
    43  
    44  integration-cleanup :
    45  	$(PWD)/bin/cleanup-integration
    46  
    47  integration-experimental : build integration-cleanup
    48  	CF_CLI_EXPERIMENTAL=true ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/experimental
    49  
    50  integration-isolated : build integration-cleanup
    51  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated
    52  
    53  integration-plugin : build integration-cleanup
    54  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/plugin
    55  
    56  integration-push : build integration-cleanup
    57  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/push
    58  
    59  integration-tests : build integration-cleanup
    60  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated integration/push
    61  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 integration/global
    62  	make integration-cleanup
    63  
    64  integration-tests-full : build integration-cleanup
    65  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated integration/push integration/plugin integration/experimental
    66  	ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 integration/global
    67  	make integration-cleanup
    68  
    69  out/cf : $(GOSRC)
    70  	go build -o out/cf \
    71  		-ldflags "-w \
    72  							-s \
    73  							-X code.cloudfoundry.org/cli/version.binaryVersion=$(CF_BUILD_VERSION) \
    74  							-X code.cloudfoundry.org/cli/version.binarySHA=$(CF_BUILD_SHA) \
    75  							-X code.cloudfoundry.org/cli/version.binaryBuildDate=$(CF_BUILD_DATE)" \
    76  		.
    77  
    78  test : units
    79  
    80  units : format vet build
    81  	ginkgo -r -nodes $(GINKGO_UNIT_TEST_NODES) -randomizeAllSpecs -randomizeSuites \
    82  		api actor command types util
    83  	@echo "\nSWEET SUITE SUCCESS"
    84  
    85  units-full : format vet build
    86  	@rm -f $(wildcard fixtures/plugins/*.exe)
    87  	@ginkgo version
    88  	CF_HOME=$(PWD)/fixtures ginkgo -r -nodes $(GINKGO_UNIT_TEST_NODES) -randomizeAllSpecs -randomizeSuites -skipPackage integration
    89  	@echo "\nSWEET SUITE SUCCESS"
    90  
    91  version :
    92  	@echo $(CF_BUILD_VERSION)+$(CF_BUILD_SHA).$(CF_BUILD_DATE)
    93  
    94  vet :
    95  	@echo  "Vetting packages for potential issues..."
    96  	go tool vet -all -shadow=true ./api ./actor ./command ./integration ./types ./util ./version
    97  
    98  .PHONY : all build clean i18n format version vet
    99  .PHONY : test units units-full integration integration-tests-full integration-cleanup integration-experimental integration-plugin integration-isolated integration-push
   100  .PHONY : fly-windows-experimental fly-windows-isolated fly-windows-plugin fly-windows-push