You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

62 lines
1.7 KiB

  1. .DEFAULT_GOAL := default
  2. IMAGE ?= docker.cluster.fun/averagemarcus/twitter-profile-pic:latest
  3. .PHONY: test # Run all tests, linting and format checks
  4. test: lint check-format run-tests
  5. .PHONY: lint # Perform lint checks against code
  6. lint:
  7. @echo "⚠️ 'lint' unimplemented"
  8. .PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
  9. check-format:
  10. @echo "⚠️ 'check-format' unimplemented"
  11. .PHONY: format # Performs automatic format fixes on all code
  12. format:
  13. @echo "⚠️ 'format' unimplemented"
  14. .PHONY: run-tests # Runs all tests
  15. run-tests:
  16. @echo "⚠️ 'run-tests' unimplemented"
  17. .PHONY: fetch-deps # Fetch all project dependencies
  18. fetch-deps:
  19. @npm install
  20. .PHONY: build # Build the project
  21. build: lint check-format fetch-deps
  22. @echo "⚠️ 'build' unimplemented"
  23. .PHONY: docker-build # Build the docker image
  24. docker-build:
  25. @docker build -t $(IMAGE) .
  26. .PHONY: docker-publish # Push the docker image to the remote registry
  27. docker-publish:
  28. @docker push $(IMAGE)
  29. .PHONY: run # Run the application
  30. run:
  31. @npm start
  32. .PHONY: ci # Perform CI specific tasks to perform on a pull request
  33. ci:
  34. @echo "⚠️ 'ci' unimplemented"
  35. .PHONY: release # Release the latest version of the application
  36. release:
  37. @kubectl --namespace twitter-profile-pic set image deployment twitter-profile-pic web=docker.cluster.fun/averagemarcus/twitter-profile-pic:$(SHA)
  38. .PHONY: help # Show this list of commands
  39. help:
  40. @echo "${REPO_NAME}"
  41. @echo "Usage: make [target]"
  42. @echo ""
  43. @echo "target description" | expand -t20
  44. @echo "-----------------------------------"
  45. @grep '^.PHONY: .* #' Makefile | sed 's/\.PHONY: \(.*\) # \(.*\)/\1 \2/' | expand -t20
  46. default: test build