|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
3 | | -set -x; |
| 3 | +set +x; |
4 | 4 |
|
5 | | -AUTH_JSON=${1:-~/.composer/auth.json}; # Path to an auth.json file allowing to install the targeted edition and version |
| 5 | +AUTH_JSON=$(realpath "${1:-~/.composer/auth.json}"); # Path to an auth.json file allowing to install the targeted edition and version |
6 | 6 | PHP_API_OUTPUT_DIR=${2:-./docs/api/php_api/php_api_reference}; # Path to the directory where the built PHP API Reference is hosted |
7 | 7 | REST_API_OUTPUT_FILE=${3:-./docs/api/rest_api/rest_api_reference/rest_api_reference.html}; # Path to the REST API Reference file |
8 | 8 | REST_API_OPENAPI_FILE_YAML=${4:-./docs/api/rest_api/rest_api_reference/openapi.yaml}; # Path to the REST API OpenAPI spec file |
@@ -63,22 +63,22 @@ cd $TMP_DXP_DIR; # /!\ Change working directory (reason why all paths must be ab |
63 | 63 | if [ 0 -eq $DXP_ALREADY_EXISTS ]; then |
64 | 64 | echo "Creating ibexa/$DXP_EDITION-skeleton:$DXP_VERSION project in ${TMP_DXP_DIR}…"; |
65 | 65 | if [[ "$DXP_VERSION" == *".x-dev" ]]; then |
66 | | - composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=dev; |
| 66 | + COMPOSER_AUTH="$(cat $AUTH_JSON | tr -d '\n')" composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=dev; |
67 | 67 | if [ -n "$AUTH_JSON" ]; then |
68 | 68 | cp $AUTH_JSON ./; |
69 | 69 | fi; |
70 | 70 | composer config repositories.ibexa composer https://updates.ibexa.co; |
71 | 71 | composer config extra.symfony.endpoint "https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/main"; |
72 | 72 | composer require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; |
73 | 73 | elif [[ "$DXP_VERSION" == *"-rc"* ]]; then |
74 | | - composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=rc; |
| 74 | + COMPOSER_AUTH="$(cat $AUTH_JSON | tr -d '\n')" composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=rc; |
75 | 75 | if [ -n "$AUTH_JSON" ]; then |
76 | 76 | cp $AUTH_JSON ./; |
77 | 77 | fi; |
78 | 78 | composer config repositories.ibexa composer https://updates.ibexa.co; |
79 | 79 | composer require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; |
80 | 80 | else |
81 | | - composer create-project ibexa/$DXP_EDITION-skeleton:$DXP_VERSION . --no-interaction --no-install --ignore-platform-reqs --no-scripts; |
| 81 | + COMPOSER_AUTH="$(cat $AUTH_JSON | tr -d '\n')" composer create-project ibexa/$DXP_EDITION-skeleton:$DXP_VERSION . --no-interaction --no-install --ignore-platform-reqs --no-scripts; |
82 | 82 | if [ -n "$AUTH_JSON" ]; then |
83 | 83 | cp $AUTH_JSON ./; |
84 | 84 | fi; |
|
0 commit comments