Pico/Makefile
Daniel Rudolf 1aacce829f
🎉 Switch from Travis CI to GitHub Actions for release deployment
Since Travis CI was transformed into a proprietary service we didn't have a CI pipeline. This heavily refactors and simplifies the CI pipeline and uses GitHub Actions to deploy new Pico releases. You can use Pico's Makefile to build new releases locally, too. Pico's build script no longer depends on any external resources (like our `picocms/ci-tools` collection). However, this isn't true for other release deployment steps, like updating phpDoc class docs, version badge, cloc stats, etc., even though the CI scripts are mostly self-containing now.
2022-02-27 23:05:17 +01:00

51 lines
1.2 KiB
Makefile

# Pico -- Makefile
# Makefile to build new Pico releases using './.build/build.sh'.
#
# This file is part of Pico, a stupidly simple, blazing fast, flat file CMS.
# Visit us at https://picocms.org/ for more info.
#
# Copyright (c) 2022 Daniel Rudolf <https://www.daniel-rudolf.de>
#
# This work is licensed under the terms of the MIT license.
# For a copy, see LICENSE file or <https://opensource.org/licenses/MIT>.
#
# SPDX-License-Identifier: MIT
# License-Filename: LICENSE
version?=
nocheck?=false
php?=php
composer?=composer
app_name=pico
archive_tar=$(app_name)-release-*.tar.gz
archive_zip=$(app_name)-release-*.zip
export=$(app_name)-export.tar.gz
all: clean build
clean: clean-build clean-export
clean-build:
find "." -name "$(archive_tar)" -exec rm -f {} \;
find "." -name "$(archive_zip)" -exec rm -f {} \;
clean-export:
rm -f "./$(export)"
build: export PHP=$(php)
build: export COMPOSER=$(composer)
build:
./.build/build.sh$(if $(filter true,$(nocheck)), --no-check,)$(if $(version), "$(version)",)
export:
git archive --prefix "$(app_name)/" -o "./$(export)" HEAD
composer:
$(composer) install --optimize-autoloader --no-dev
.PHONY: all \
clean clean-build clean-export \
build export \
composer