Skip to content

Instantly share code, notes, and snippets.

@kamermans
Created October 19, 2013 19:38
Show Gist options
  • Select an option

  • Save kamermans/7060513 to your computer and use it in GitHub Desktop.

Select an option

Save kamermans/7060513 to your computer and use it in GitHub Desktop.
Apigen install and build script for automated deployments
#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
COMPOSER=$(which composer || echo "$(pwd)/../composer.phar")
if [ ! -f "$COMPOSER" ]; then
echo "Installing composer"
cd ..
curl -sS https://getcomposer.org/installer | php
$COMPOSER install
cd build
fi
# This way we don't need to put apigen in the main composer file
if [ ! -d apigen/ ]; then
echo "Installing apigen..."
mkdir apigen
cd apigen
echo '{"require":{"apigen/apigen": "2.8.0"}}' > composer.json
$COMPOSER install
cd ..
fi
php apigen/vendor/apigen/apigen/apigen.php --config apigen.neon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment