-
Notifications
You must be signed in to change notification settings - Fork 289
/
Makefile
36 lines (28 loc) · 1.11 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
.PHONY: build-assets dist clean
BUILD_DIR="build/baikal"
BUILD_FILES=Core html LICENSE README.md composer.json
VERSION=$(shell php -r "include 'Core/Distrib.php'; echo BAIKAL_VERSION;")
dist: vendor/autoload.php
# Building Baikal $(VERSION)
rm -r $(BUILD_DIR); true
mkdir -p $(BUILD_DIR) $(BUILD_DIR)/Specific $(BUILD_DIR)/Specific/db $(BUILD_DIR)/config
touch $(BUILD_DIR)/Specific/db/.empty
touch $(BUILD_DIR)/config/.empty
rsync -av \
$(BUILD_FILES) \
--exclude="*.swp" \
$(BUILD_DIR)
composer config platform.php 8.1 -d $(BUILD_DIR)
composer install --no-interaction --no-dev -d $(BUILD_DIR)
rm $(BUILD_DIR)/composer.*
cd build; zip -r baikal-$(VERSION).zip baikal/
build-assets: vendor/autoload.php
cat vendor/sabre/dav/examples/sql/mysql.*.sql > Core/Resources/Db/MySQL/db.sql
cat vendor/sabre/dav/examples/sql/sqlite.*.sql > Core/Resources/Db/SQLite/db.sql
vendor/autoload.php: composer.lock
composer install --no-interaction
composer.lock: composer.json
composer update --no-interaction
clean:
# Wipe out all local data, and go back to a clean install
rm config/baikal.yaml Specific/db/db.sqlite; true