-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
executable file
·51 lines (43 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
test: prepare_module
composer tests
prepare_module:
composer pre-module-install
deps:
ifneq ($(NOT_USE_VENDOR),1)
composer install
endif
install_bitrix: 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)","")
wget --progress=dot -e dotbytes=10M -O /tmp/$(BITRIX_EDITION).tar.gz https://www.1c-bitrix.ru/download/$(BITRIX_EDITION).tar.gz
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
build_release:
ifneq ($(LAST_TAG),$(RELEASE_TAG))
git diff --name-status $(LAST_TAG) HEAD > $(ROOT_DIR)/release/diff
php bin/build-release
bash bin/build $(CURRENT_VERSION) $(ROOT_DIR)/release/
else
@exit 0
endif
cleanup:
@rm -rf $(ROOT_DIR)/release/$(CURRENT_VERSION)
@rm $(ROOT_DIR)/release/$(CURRENT_VERSION).tar.gz
run_local_tests:
docker-compose up -d --build
docker exec app_test make install_bitrix deps test
docker-compose down