Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # This file was auto-generated, do not edit it directly.
  2. # Instead run bin/update_build_scripts from
  3. # https://github.com/sharelatex/sharelatex-dev-environment
  4. # Version: 1.1.3
  5. BUILD_NUMBER ?= local
  6. BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
  7. PROJECT_NAME = clsi
  8. DOCKER_COMPOSE_FLAGS ?= -f docker-compose.yml
  9. DOCKER_COMPOSE := BUILD_NUMBER=$(BUILD_NUMBER) \
  10. BRANCH_NAME=$(BRANCH_NAME) \
  11. PROJECT_NAME=$(PROJECT_NAME) \
  12. MOCHA_GREP=${MOCHA_GREP} \
  13. docker-compose ${DOCKER_COMPOSE_FLAGS}
  14. clean:
  15. rm -f app.js
  16. rm -rf app/js
  17. rm -rf test/unit/js
  18. rm -rf test/acceptance/js
  19. test: test_unit test_acceptance
  20. test_unit:
  21. @[ ! -d test/unit ] && echo "clsi has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit
  22. test_acceptance: test_clean test_acceptance_pre_run # clear the database before each acceptance test run
  23. @[ ! -d test/acceptance ] && echo "clsi has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance
  24. test_clean:
  25. $(DOCKER_COMPOSE) down -v -t 0
  26. test_acceptance_pre_run:
  27. @[ ! -f test/acceptance/scripts/pre-run ] && echo "clsi has no pre acceptance tests task" || $(DOCKER_COMPOSE) run --rm test_acceptance test/acceptance/scripts/pre-run
  28. build:
  29. docker build --pull --tag gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) .
  30. publish:
  31. docker push gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
  32. .PHONY: clean test test_unit test_acceptance test_clean build publish