Pico/.build/init.sh.inc
Daniel Rudolf 58f615403e
Refactor Build system
- Separate Travis branch deployment and release deployment stages (also makes `deploy.sh` obsolete)
- Add `clean.sh` and `release.sh` scripts to allow users to create "release" packages locally
- Use `setup/*.sh` scripts to check and install build dependencies (like PHP_CodeSniffer, phpDocumentor and cloc)
- Use `create-release.sh` of `picocms/ci-tools` to create release archives
- Streamline script usage

Use the following to test Pico and to create a "release" package locally:

```sh
cd ~/My-Pico-Workspace/Components/pico

ln -rs ../ci-tools .build/ci-tools

. ./.build/ci-tools/init/local.sh.inc
. ./.build/init.sh.inc

phpcs --standard=.phpcs.xml "$PICO_PROJECT_DIR"

clean.sh
release.sh
```
2019-11-03 20:03:48 +01:00

19 lines
748 B
PHP

if [ -z "$PICO_BUILD_ENV" ]; then
echo "No Pico build environment specified" >&2
exit 1
fi
# add project build dir to $PATH
export PATH="$PICO_PROJECT_DIR/.build:$PATH"
# set environment variables
__picocms_cmd export RELEASE_REPO_SLUG="${RELEASE_REPO_SLUG:-picocms/pico-composer}"
__picocms_cmd export RELEASE_REPO_BRANCH="${RELEASE_REPO_BRANCH:-master}"
if [ "$PROJECT_REPO_SLUG" != "picocms/Pico" ]; then
__picocms_cmd export DEPLOY_REPO_SLUG="${DEPLOY_REPO_SLUG:-$PROJECT_REPO_SLUG}"
__picocms_cmd export DEPLOY_REPO_BRANCH="${DEPLOY_REPO_BRANCH:-gh-pages}"
else
__picocms_cmd export DEPLOY_REPO_SLUG="${DEPLOY_REPO_SLUG:-picocms.github.io}"
__picocms_cmd export DEPLOY_REPO_BRANCH="${DEPLOY_REPO_BRANCH:-master}"
fi