gopkg.in/openshift/source-to-image.v1@v1.2.0/Makefile (about)

     1  # Old-skool build tools.
     2  #
     3  # Targets (see each target for more information):
     4  #   all: Build code.
     5  #   build: Build code.
     6  #   check: Run build, verify and tests.
     7  #   test: Run tests.
     8  #   clean: Clean up.
     9  #   release: Build release.
    10  
    11  OUT_DIR = _output
    12  
    13  export GOFLAGS
    14  
    15  # Build code.
    16  #
    17  # Args:
    18  #   GOFLAGS: Extra flags to pass to 'go' when building.
    19  #
    20  # Example:
    21  #   make
    22  #   make all
    23  all build:
    24  	hack/build-go.sh
    25  .PHONY: all build
    26  
    27  # Verify if code is properly organized.
    28  #
    29  # Example:
    30  #   make verify
    31  verify: build
    32  	hack/verify-gofmt.sh
    33  	hack/verify-golint.sh
    34  	hack/verify-govet.sh
    35  	hack/verify-godeps.sh || true # remove this to make godepchecker's warnings actionable
    36  	hack/verify-bash-completion.sh
    37  .PHONY: verify
    38  
    39  # Install travis dependencies
    40  #
    41  # Example:
    42  #   make install-travis
    43  install-travis:
    44  	hack/install-tools.sh
    45  .PHONY: install-travis
    46  
    47  # Build and run unit tests
    48  #
    49  # Args:
    50  #   WHAT: Directory names to test.  All *_test.go files under these
    51  #     directories will be run.  If not specified, "everything" will be tested.
    52  #   TESTS: Same as WHAT.
    53  #   GOFLAGS: Extra flags to pass to 'go' when building.
    54  #   TESTFLAGS: Extra flags that should only be passed to hack/test-go.sh
    55  #
    56  # Example:
    57  #   make check
    58  #   make test
    59  #   make check WHAT=pkg/docker TESTFLAGS=-v
    60  check: verify test	
    61  .PHONY: check
    62  
    63  # Run unit tests
    64  # Example:
    65  #   make test
    66  #   make test-unit
    67  #   make test WHAT=pkg/docker TESTFLAGS=-v 
    68  test test-unit: 
    69  	hack/test-go.sh $(WHAT) $(TESTS) $(TESTFLAGS)
    70  .PHONY: test test-unit
    71  
    72  # Run dockerfile integration tests
    73  # Example:
    74  #   make test-dockerfile
    75  #   make test-dockerfile TESTFLAGS="-run TestDockerfileIncremental"
    76  test-dockerfile:
    77  	hack/test-dockerfile.sh $(TESTFLAGS)
    78  .PHONY: test-dockerfile
    79  
    80  # Run docker integration tests - may require sudo permissions
    81  # Exmaple:
    82  #   make test-docker
    83  #   make test-docker TESTFLAGS="-run TestCleanBuild"
    84  test-docker:
    85  	hack/test-docker.sh $(TESTFLAGS)
    86  .PHONY: test-docker
    87  
    88  # Remove all build artifacts.
    89  #
    90  # Example:
    91  #   make clean
    92  clean:
    93  	rm -rf $(OUT_DIR)
    94  .PHONY: clean
    95  
    96  # Build the release.
    97  #
    98  # Example:
    99  #   make release
   100  release: clean
   101  	hack/build-release.sh
   102  	hack/extract-release.sh
   103  .PHONY: release
   104  
   105  # Update dependencies
   106  update-deps:
   107  	hack/update-deps.sh
   108  .PHONY: update-deps