os: linux dist: trusty language: php if: tag IS blank env: global: - DB_BITRIX_HOST=localhost - DB_BITRIX_LOGIN=root - DB_BITRIX_PASS=root - DB_BITRIX_NAME=bitrix - BITRIX_PATH=$TRAVIS_BUILD_DIR/bitrix stages: - test - deploy install: - echo 'short_open_tag = On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'mbstring.func_overload = 2' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'mbstring.internal_encoding = "UTF-8"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - export LAST_TAG=`git describe --abbrev=0 --tags` - export CURRENT_VERSION=v`php bin/bitrix-version` before_script: - make create_db - make bitrix_install script: make test jobs: include: - php: 7.0 env: NOT_USE_VENDOR=1 BITRIX_EDITION=small_business_encode after_success: bash <(curl -s https://codecov.io/bash) - php: 7.1 env: BITRIX_EDITION=small_business_encode - php: 7.2 env: BITRIX_EDITION=small_business_encode - php: 7.3 env: BITRIX_EDITION=small_business_encode - php: 7.0 env: NOT_USE_VENDOR=1 BITRIX_EDITION=business_encode - php: 7.1 env: BITRIX_EDITION=business_encode - php: 7.2 env: BITRIX_EDITION=business_encode - php: 7.3 env: BITRIX_EDITION=business_encode - stage: deploy php: 7.1 before_script: export VERSION=`php bin/bitrix-version` script: make build_release before_deploy: - export ARCHIVE_NAME=$TRAVIS_BUILD_DIR/release/$VERSION.tar.gz - git config --local user.name "retailCRM" - git config --local user.email "support@retailcrm.ru" - export TRAVIS_TAG=v$VERSION - git tag $TRAVIS_TAG deploy: provider: releases token: $GITHUB_OAUTH_TOKEN file: $ARCHIVE_NAME skip_cleanup: true on: condition: "$LAST_TAG != $CURRENT_VERSION" if: branch = master AND type = push AND fork = false after_deploy: make cleanup