diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d6e38953..45154b95a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,10 +11,10 @@ stages: - - build-doc - - deploy-doc - test - deploy + - build-doc + - deploy-doc @@ -31,6 +31,18 @@ test:php-7: image: chill/ci-image:php-7 script: phpunit + +deploy-packagist: + stage: deploy + image: chill/ci-image:php-7 + before_script: + # test that PACKAGIST USERNAME and PACKAGIST_TOKEN variable are set + - if [ -z ${PACKAGIST_USERNAME+x} ]; then echo "Please set PACKAGIST_USERNAME variable"; exit -1; fi + - if [ -z ${PACKAGIST_TOKEN+x} ]; then echo "Please set PACKAGIST_TOKEN variable"; exit -1; fi + script: + - STATUSCODE=$(curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN" -d"{\"repository\":{\"url\":\"$CI_PROJECT_URL.git\"}}" --silent --output /dev/stderr --write-out "%{http_code}") + - if [ $STATUSCODE = "202" ]; then exit 0; else exit $STATUSCODE; fi + # deploy documentation api-doc-build: stage: build-doc @@ -47,14 +59,4 @@ api-doc-build: only: - master - tags - -deploy-packagist: - stage: deploy - image: chill/ci-image:php-7 - before_script: - # test that PACKAGIST USERNAME and PACKAGIST_TOKEN variable are set - - if [ -z ${PACKAGIST_USERNAME+x} ]; then echo "Please set PACKAGIST_USERNAME variable"; exit -1; fi - - if [ -z ${PACKAGIST_TOKEN+x} ]; then echo "Please set PACKAGIST_TOKEN variable"; exit -1; fi - script: - - STATUSCODE=$(curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN" -d"{\"repository\":{\"url\":\"$CI_PROJECT_URL.git\"}}" --silent --output /dev/stderr --write-out "%{http_code}") - - if [ $STATUSCODE = "202" ]; then exit 0; else exit $STATUSCODE; fi + diff --git a/apigen.neon b/apigen.neon index e651150f6..7b4c4afc0 100644 --- a/apigen.neon +++ b/apigen.neon @@ -6,7 +6,7 @@ source: exclude: - vendor/* - - Resource/test/* + - Resources/test/* title: Chill EventBundle