diff --git a/.travis.yml b/.travis.yml index 5c12afc..d39f814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,22 +38,45 @@ before_script: - cd ${PLUGIN_DIRECTORY}/${PLUGIN_NAME} script: - - wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/blob/master/frosh-plugin-upload.phar?raw=true' -O frosh-plugin-upload.phar - composer test - composer test-unit after_success: - ./build.sh $TRAVIS_TAG + +stages: + - test + - Store-Check + - name: Store-Sync + if: branch = 1.3 + - name: Store-Deploy + if: tag IS present jobs: include: - - stage: Store-Check - php: 7.3 - install: - - ./build.sh - - wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/blob/master/frosh-plugin-upload.phar?raw=true' -O frosh-plugin-upload.phar - script: - - php frosh-plugin-upload.phar plugin:validate ${TRAVIS_BUILD_DIR}/FroshProfiler*.zip + - stage: Store-Check + php: 7.3 + before_script: skip + install: + - ./build.sh 1.3 + - wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/blob/master/frosh-plugin-upload.phar?raw=true' -O frosh-plugin-upload.phar + script: + - php frosh-plugin-upload.phar plugin:validate ${TRAVIS_BUILD_DIR}/${PLUGIN_NAME}*.zip + - stage: Store-Sync + before_script: skip + php: 7.3 + install: + - wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/blob/master/frosh-plugin-upload.phar?raw=true' -O frosh-plugin-upload.phar + script: + - php frosh-plugin-upload.phar plugin:update ${TRAVIS_BUILD_DIR}/Resources/store + - stage: Store-Deploy + before_script: skip + php: 7.3 + install: + - wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/blob/master/frosh-plugin-upload.phar?raw=true' -O frosh-plugin-upload.phar + script: + - ./build.sh + - php frosh-plugin-upload.phar plugin:upload ${TRAVIS_BUILD_DIR}/${PLUGIN_NAME}*.zip deploy: - provider: releases @@ -64,13 +87,3 @@ deploy: file: FroshProfiler*.zip on: tags: true - - provider: script - script: php frosh-plugin-upload.phar plugin:upload ${PLUGIN_DIRECTORY}/${PLUGIN_NAME}/FroshProfiler*.zip - skip_cleanup: true - on: - tags: true - - provider: script - script: php frosh-plugin-upload.phar plugin:update ${PLUGIN_DIRECTORY}/${PLUGIN_NAME}/Resources/store - skip_cleanup: true - on: - branch: 1.3