<commit_before>#!/usr/bin/env bash

#
# List of contrib packages to be released
#
# Each package definition is of form:
#
# PKG_<NAME>=(
#   "package.name"
#   "build.target"
#   "pkg_<name>_install_test"
# )
# function pkg_<name>_install_test() {
#   ...
# }
#

PKG_ANDROID=(
  "pantsbuild.pants.contrib.android"
  "//contrib/android/src/python/pants/contrib/android:plugin"
  "pkg_android_install_test"
)
function pkg_android_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.android==$(local_version)']" \
    --explain apk | grep "apk" &> /dev/null
}


PKG_SCROOGE=(
  "pantsbuild.pants.contrib.scrooge"
  "//contrib/scrooge/src/python/pants/contrib/scrooge:plugin"
  "pkg_scrooge_install_test"
)
function pkg_scrooge_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.scrooge==$(local_version)']" \
    --explain gen | grep "scrooge" &> /dev/null && \
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.scrooge==$(local_version)']" \
    goals | grep "thrift-linter" &> /dev/null
}

PKG_BUILDGEN=(
  "pantsbuild.pants.contrib.buildgen"
  "//contrib/buildgen/src/python/pants/contrib/buildgen:plugin"
  "pkg_buildgen_install_test"
)
function pkg_buildgen_install_test() {
  PIP_ARGS="$@"
  pip install ${PIP_ARGS} pantsbuild.pants.contrib.buildgen==$(local_version) && \
  python -c "from pants.contrib.buildgen.build_file_manipulator import *"
}

PKG_SPINDLE=(
  "pantsbuild.pants.contrib.spindle"
  "//contrib/spindle/src/python/pants/contrib/spindle:plugin"
  "pkg_spindle_install_test"
)
function pkg_spindle_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.spindle==$(local_version)']" \
    --explain gen | grep "spindle" &> /dev/null
}

PKG_GO=(
  "pantsbuild.pants.contrib.go"
  "//contrib/go/src/python/pants/contrib/go:plugin"
  "pkg_go_install_test"
)
function pkg_go_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.go==$(local_version)']" \
      buildgen test contrib/go/examples::
}

PKG_NODE=(
  "pantsbuild.pants.contrib.node"
  "//contrib/node/src/python/pants/contrib/node:plugin"
  "pkg_node_install_test"
)
function pkg_node_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.node==$(local_version)']" \
      test.node contrib/node/examples::
}

PKG_SCALAJS=(
  "pantsbuild.pants.contrib.scalajs"
  "//contrib/scalajs/src/python/pants/contrib/scalajs:plugin"
  "pkg_scalajs_install_test"
)
function pkg_scalajs_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.scalajs==$(local_version)']" \
      test contrib/scalajs::
}

PKG_PYTHON_CHECKS=(
  "pantsbuild.pants.contrib.python.checks"
  "//contrib/python/src/python/pants/contrib/python/checks:plugin"
  "pkg_python_checks_install_test"
)
function pkg_python_checks_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.python.checks==$(local_version)']" \
    --explain compile | grep "python-eval" &> /dev/null && \
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.python.checks==$(local_version)']" \
    --explain compile | grep "pythonstyle" &> /dev/null
}

# Once individual (new) package is declared above, insert it into the array below)
CONTRIB_PACKAGES=(
  PKG_ANDROID
  PKG_SCROOGE
  PKG_BUILDGEN
  PKG_SPINDLE
  PKG_GO
  PKG_NODE
  PKG_PYTHON_CHECKS
  PKG_SCALAJS
)<commit_msg>Add FindBugs plugin to released plugins<commit_after>#!/usr/bin/env bash

#
# List of contrib packages to be released
#
# Each package definition is of form:
#
# PKG_<NAME>=(
#   "package.name"
#   "build.target"
#   "pkg_<name>_install_test"
# )
# function pkg_<name>_install_test() {
#   ...
# }
#

PKG_ANDROID=(
  "pantsbuild.pants.contrib.android"
  "//contrib/android/src/python/pants/contrib/android:plugin"
  "pkg_android_install_test"
)
function pkg_android_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.android==$(local_version)']" \
    --explain apk | grep "apk" &> /dev/null
}


PKG_SCROOGE=(
  "pantsbuild.pants.contrib.scrooge"
  "//contrib/scrooge/src/python/pants/contrib/scrooge:plugin"
  "pkg_scrooge_install_test"
)
function pkg_scrooge_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.scrooge==$(local_version)']" \
    --explain gen | grep "scrooge" &> /dev/null && \
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.scrooge==$(local_version)']" \
    goals | grep "thrift-linter" &> /dev/null
}

PKG_BUILDGEN=(
  "pantsbuild.pants.contrib.buildgen"
  "//contrib/buildgen/src/python/pants/contrib/buildgen:plugin"
  "pkg_buildgen_install_test"
)
function pkg_buildgen_install_test() {
  PIP_ARGS="$@"
  pip install ${PIP_ARGS} pantsbuild.pants.contrib.buildgen==$(local_version) && \
  python -c "from pants.contrib.buildgen.build_file_manipulator import *"
}

PKG_SPINDLE=(
  "pantsbuild.pants.contrib.spindle"
  "//contrib/spindle/src/python/pants/contrib/spindle:plugin"
  "pkg_spindle_install_test"
)
function pkg_spindle_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.spindle==$(local_version)']" \
    --explain gen | grep "spindle" &> /dev/null
}

PKG_GO=(
  "pantsbuild.pants.contrib.go"
  "//contrib/go/src/python/pants/contrib/go:plugin"
  "pkg_go_install_test"
)
function pkg_go_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.go==$(local_version)']" \
      buildgen test contrib/go/examples::
}

PKG_NODE=(
  "pantsbuild.pants.contrib.node"
  "//contrib/node/src/python/pants/contrib/node:plugin"
  "pkg_node_install_test"
)
function pkg_node_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.node==$(local_version)']" \
      test.node contrib/node/examples::
}

PKG_SCALAJS=(
  "pantsbuild.pants.contrib.scalajs"
  "//contrib/scalajs/src/python/pants/contrib/scalajs:plugin"
  "pkg_scalajs_install_test"
)
function pkg_scalajs_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.scalajs==$(local_version)']" \
      test contrib/scalajs::
}

PKG_PYTHON_CHECKS=(
  "pantsbuild.pants.contrib.python.checks"
  "//contrib/python/src/python/pants/contrib/python/checks:plugin"
  "pkg_python_checks_install_test"
)
function pkg_python_checks_install_test() {
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.python.checks==$(local_version)']" \
    --explain compile | grep "python-eval" &> /dev/null && \
  execute_packaged_pants_with_internal_backends \
    --plugins="['pantsbuild.pants.contrib.python.checks==$(local_version)']" \
    --explain compile | grep "pythonstyle" &> /dev/null
}

PKG_FINDBUGS=(
  "pantsbuild.pants.contrib.findbugs"
  "//contrib/findbugs/src/python/pants/contrib/findbugs:plugin"
  "pkg_findbugs_install_test"
)
function pkg_findbugs_install_test() {
  execute_packaged_pants_with_internal_backends \
      --plugins="['pantsbuild.pants.contrib.findbugs==$(local_version)']" \
      --explain compile | grep "findbugs" &> /dev/null
}

# Once individual (new) package is declared above, insert it into the array below)
CONTRIB_PACKAGES=(
  PKG_ANDROID
  PKG_SCROOGE
  PKG_BUILDGEN
  PKG_SPINDLE
  PKG_GO
  PKG_NODE
  PKG_PYTHON_CHECKS
  PKG_SCALAJS
  PKG_FINDBUGS
)
{'fraction_non_alphanumeric': 0.1431891542930923, 'fraction_numerical': 0.0, 'mean_word_length': 4.8240601503759395, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 22, 'https://': 0, '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': '6315017', 'n_tokens_mistral': 3023, 'n_tokens_neox': 2934, 'n_words': 329}