github.com/replicatedhq/ship@v0.55.0/web/app/Makefile (about)

     1  .PHONY: clean_build_artifacts clean deps serve_ship build_ship build_ship_dev test test_CI
     2  
     3  SHELL := /bin/bash
     4  $SRC = $(shell find . -path "./node_modules" -prune -o -path "./build" -prune -o \( -name "*.js" -o -name "*.jsx" -o -name "*.scss" -o -name "*.json" -o -name "*.svg" -o -name "*.png" \) -print)
     5  
     6  .state/package: package.json yarn.lock
     7  	if [[ -n "${CIRCLECI}" ]]; then CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile; else yarn install --frozen-lockfile; fi
     8  	@mkdir -p .state
     9  	@touch .state/package
    10  
    11  .state/package-init: ../init/package.json ../init/yarn.lock .state/package
    12  	cd ../init && \
    13  		yarn --frozen-lockfile && \
    14  		yarn build && \
    15  		yarn link
    16  		yarn link @replicatedhq/ship-init
    17  	@mkdir -p .state
    18  	@touch .state/package-init
    19  
    20  .state/package-init-dev: ../init/package.json ../init/yarn.lock .state/package
    21  	cd ../init && \
    22  		yarn --frozen-lockfile && \
    23  		yarn build-dev && \
    24  		yarn link
    25  		yarn link @replicatedhq/ship-init
    26  	@mkdir -p .state
    27  	@touch .state/package-init-dev
    28  
    29  clean_build_artifacts:
    30  	rm -rf build
    31  	rm -rf dist
    32  	rm -rf ../init/dist
    33  
    34  clean: clean_build_artifacts
    35  	rm -rf node_modules
    36  	rm -rf ../init/node_modules
    37  	rm -rf .state
    38  
    39  deps: .state/package .state/package-init
    40  
    41  deps-dev: .state/package .state/package-init-dev
    42  
    43  serve_ship:
    44  	yarn start
    45  
    46  .state/build_ship: deps $(shell find src -type f)
    47  	yarn build
    48  	@mkdir -p .state
    49  	@touch .state/build_ship
    50  	@touch .state/built-ui
    51  
    52  .state/build_ship_dev: deps-dev
    53  	yarn build
    54  	@mkdir -p .state
    55  	@touch .state/build_ship_dev
    56  	@touch .state/built-ui
    57  
    58  build_ship: .state/build_ship
    59  
    60  build_ship_dev: .state/build_ship_dev
    61  
    62  test:
    63  	yarn test
    64  
    65  test_CI:
    66  	cd ../init && \
    67  	yarn --frozen-lockfile && \
    68  	CI=1 yarn test