2020-03-23 15:12:07 +03:00
|
|
|
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
2019-02-28 14:45:39 +03:00
|
|
|
test: prepare_module
|
2020-03-23 15:12:07 +03:00
|
|
|
composer tests
|
|
|
|
|
2020-11-23 15:38:53 +03:00
|
|
|
prepare_module:
|
2020-03-23 15:12:07 +03:00
|
|
|
composer pre-module-install
|
|
|
|
|
|
|
|
deps:
|
|
|
|
ifneq ($(NOT_USE_VENDOR),1)
|
|
|
|
composer install
|
|
|
|
endif
|
|
|
|
|
|
|
|
bitrix_install: download_bitrix
|
|
|
|
@echo "===== Installing Bitrix..."
|
|
|
|
@php bin/bitrix-install db_type
|
|
|
|
@php bin/bitrix-install requirement
|
|
|
|
@php bin/bitrix-install db_create
|
|
|
|
@php bin/bitrix-install main_module
|
|
|
|
@php bin/bitrix-install module
|
|
|
|
@php bin/bitrix-install admin
|
|
|
|
@php bin/bitrix-install load_module
|
|
|
|
@php bin/bitrix-install load_module_action
|
|
|
|
@php bin/bitrix-install finish
|
|
|
|
|
|
|
|
download_bitrix:
|
|
|
|
ifeq ("$(wildcard $(BITRIX_PATH)/bitrix/php_interface/dbconn.php)","")
|
2020-11-23 15:38:53 +03:00
|
|
|
wget --progress=dot -e dotbytes=10M -O /tmp/$(BITRIX_EDITION).tar.gz https://www.1c-bitrix.ru/download/$(BITRIX_EDITION).tar.gz
|
2020-03-23 15:12:07 +03:00
|
|
|
mkdir -p $(BITRIX_PATH)
|
|
|
|
chmod -R 777 $(BITRIX_PATH)
|
|
|
|
tar -xf /tmp/$(BITRIX_EDITION).tar.gz -C $(BITRIX_PATH)
|
|
|
|
rm /tmp/$(BITRIX_EDITION).tar.gz
|
|
|
|
endif
|
|
|
|
|
2020-03-24 11:36:32 +03:00
|
|
|
build_release:
|
2020-11-23 15:38:53 +03:00
|
|
|
ifneq ($(LAST_TAG),$(RELEASE_TAG))
|
2020-03-23 15:12:07 +03:00
|
|
|
git diff --name-status $(LAST_TAG) HEAD > $(ROOT_DIR)/release/diff
|
2020-03-24 11:36:32 +03:00
|
|
|
php bin/build-release
|
2020-11-23 15:38:53 +03:00
|
|
|
bash bin/build $(CURRENT_VERSION) $(ROOT_DIR)/release/
|
2020-03-24 11:36:32 +03:00
|
|
|
else
|
|
|
|
@exit 0
|
|
|
|
endif
|
2020-03-23 15:12:07 +03:00
|
|
|
|
|
|
|
cleanup:
|
2020-11-23 15:38:53 +03:00
|
|
|
@rm -rf $(ROOT_DIR)/release/$(CURRENT_VERSION)
|
|
|
|
@rm $(ROOT_DIR)/release/$(CURRENT_VERSION).tar.gz
|
2020-03-23 15:12:07 +03:00
|
|
|
|
|
|
|
# docker commands
|
|
|
|
install:
|
|
|
|
docker-compose exec bitrix make bitrix_install
|
2019-02-28 14:45:39 +03:00
|
|
|
|
2020-03-23 15:12:07 +03:00
|
|
|
run_tests:
|
|
|
|
docker-compose exec bitrix make test
|