<commit_before># CircleCI 2.0 configuration
version: 2
jobs:
  build:
    docker:
      - image: nathanielc/docker-client
    working_directory: ~/kapacitor
    steps:
      - checkout
      - setup_remote_docker:
          reusable: true
      - run:
          name: Tests
          command: |
            ./circle-test.sh

# This is old Circle 1.0 syntax but is should work as per
# https://discuss.circleci.com/t/git-tag-deploys-in-2-0/9493/8
deployment:
  release:
    tag: /v[0-9]+(\.[0-9]+){2}(-(rc|beta)[0-9]+)?/
    commands:
      - ./build.sh --debug --clean --generate --package --package-udfs --upload --bucket=dl.influxdata.com/kapacitor/releases --platform=all --arch=all --release<commit_msg>update circle2.0 config to deploy when tags are pushed<commit_after># CircleCI 2.0 configuration
version: 2
jobs:
  build:
    docker:
      - image: nathanielc/docker-client
    working_directory: ~/kapacitor
    steps:
      - checkout
      - setup_remote_docker:
          reusable: true
      - run:
          name: Tests
          command: |
            ./circle-test.sh
      - deploy:
          name: Deploy Release Packages
          command: |
            if [[ "$CIRCLE_TAG" =~ v[0-9]+(\.[0-9]+){2}(-(rc|beta)[0-9]+)? ]]; then
              echo "Building/Publishing release packages for tag $CIRCLE_TAG"
              ./build.sh --debug --clean --generate --package --package-udfs --upload --bucket=dl.influxdata.com/kapacitor/releases --platform=all --arch=all --release
            fi


deployment:
  fake_deploy_for_cci2:
    tag: /v[0-9]+(\.[0-9]+){2}(-(rc|beta)[0-9]+)?/
    commands:
      # NOTE: this command doesn't actually get run, rather this simply triggers that the above deploy runs when a tag is pushed.
      # See https://discuss.circleci.com/t/git-tag-deploys-in-2-0/9493/6
      - echo "make tags run in 2.0"
{'fraction_non_alphanumeric': 0.14672441797509475, 'fraction_numerical': 0.02598808879263671, 'mean_word_length': 2.148211243611584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3667885', 'n_tokens_mistral': 640, 'n_tokens_neox': 604, 'n_words': 145}