<commit_before>#!/bin/ash
#
# All UPERCASE variables are provided externally from this script

set -eu
set -o pipefail

# copy the artifact to the task-output folder
cp artifact/$ARTIFACT_GLOB task-output/.

cd task-output

# convert 'artifact-*.jar' into 'artifact-1.0.0-rc.1.jar'
appPath=$(ls $ARTIFACT_GLOB)

cat <<EOF >manifest.yml
---
applications:
- name: $CF_APP_NAME
  path: $appPath
EOF

[ -n "$CF_APP_HOST" ]      && echo "  host: $CF_APP_HOST"  >> manifest.yml
[ -n "$CF_APP_MEMORY" ]    && echo "  memory: $CF_APP_MEMORY"  >> manifest.yml
[ -n "$CF_APP_INSTANCES" ] && echo "  instances: $CF_APP_INSTANCES"  >> manifest.yml
[ -n "$CF_APP_TIMEOUT" ]   && echo "  timeout: $CF_APP_TIMEOUT"  >> manifest.yml
[ -n "$CF_APP_SERVICES" ]  && echo "  services: $CF_APP_SERVICES"  >> manifest.yml
# note: concourse passes this as a json object, which is cool
[ -n "$CF_APP_ENV_VARS" ]  && echo "  env: $CF_APP_ENV_VARS"  >> manifest.yml

echo "Generated manifest:"
cat manifest.yml<commit_msg>added note<commit_after>#!/bin/ash
#
# All UPERCASE variables are provided externally from this script

set -eu
set -o pipefail

# copy the artifact to the task-output folder
cp artifact/$ARTIFACT_GLOB task-output/.

cd task-output

# convert 'artifact-*.jar' into 'artifact-1.0.0-rc.1.jar'
appPath=$(ls $ARTIFACT_GLOB)

cat <<EOF >manifest.yml
---
applications:
- name: $CF_APP_NAME
  path: $appPath
EOF

[ -n "$CF_APP_HOST" ]      && echo "  host: $CF_APP_HOST"  >> manifest.yml
[ -n "$CF_APP_MEMORY" ]    && echo "  memory: $CF_APP_MEMORY"  >> manifest.yml
[ -n "$CF_APP_INSTANCES" ] && echo "  instances: $CF_APP_INSTANCES"  >> manifest.yml
[ -n "$CF_APP_TIMEOUT" ]   && echo "  timeout: $CF_APP_TIMEOUT"  >> manifest.yml
# note: should be passed in as an array: [service1,service2,etc]
[ -n "$CF_APP_SERVICES" ]  && echo "  services: $CF_APP_SERVICES"  >> manifest.yml
# note: concourse passes this as a json object, which is cool
[ -n "$CF_APP_ENV_VARS" ]  && echo "  env: $CF_APP_ENV_VARS"  >> manifest.yml

echo "Generated manifest:"
cat manifest.yml
{'fraction_non_alphanumeric': 0.14751703992210322, 'fraction_numerical': 0.004868549172346641, 'mean_word_length': 4.012195121951219, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 29, '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': '1173809', 'n_tokens_mistral': 809, 'n_tokens_neox': 768, 'n_words': 197}