language: java
sudo: false
jdk:
- openjdk9
git:
  submodules: false
install: true
before_script:
  - if [ ! -z "$TRAVIS_TAG" ]; then mvn versions:set -DnewVersion=$TRAVIS_TAG && mvn versions:commit; fi
script: mvn clean install -P coverage-per-test
matrix:
  fast_finish: true
cache:
  directories:
  - "$HOME/.m2/repository"
  - "$HOME/maven"
before_cache:
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
notifications:
  email: false
after_success:
- bash <(curl -s https://codecov.io/bash) -t b5356ca9-9cef-4be3-a67e-013d18ebd73a
deploy:
  provider: releases
  api_key: $API_KEY
  file_glob: true
  file:
  - esql-plugin/target/esql-plugin-*.jar
  skip_cleanup: true
  on:
    tags: true

language: java
sudo: false
jdk:
- openjdk9
git:
  submodules: false
install: true
before_script:
  - if [ ! -z "$TRAVIS_TAG" ]; then mvn versions:set -DnewVersion=$TRAVIS_TAG && mvn versions:commit; fi
script: mvn clean install -P coverage-per-test
matrix:
  fast_finish: true
cache:
  directories:
  - "$HOME/.m2/repository"
  - "$HOME/maven"
before_cache:
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
notifications:
  email: false
after_success:
- bash <(curl -s https://codecov.io/bash) -t b5356ca9-9cef-4be3-a67e-013d18ebd73a
deploy:
  - provider: releases
    prerelease: true
    api_key: $API_KEY
    file_glob: true
    file:
      - esql-plugin/target/esql-plugin-*.jar
    skip_cleanup: true
    on:
      tags: true
      condition: "$TRAVIS_TAG =~ RC[0-9]+$"
  - provider: releases
    api_key: $API_KEY
    file_glob: true
    file:
      - esql-plugin/target/esql-plugin-*.jar
    skip_cleanup: true
    on:
      tags: true
      condition: "! $TRAVIS_TAG =~ RC[0-9]+$"

Mark release candidates as pre-release
Mark release candidates as pre-release
