<commit_before>#!/bin/bash

set -euo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ..

# Lets try to detect the local machine ip..
LOCAL_IP="${SYNDESIS_DEV_LOCAL_IP:=$(./node_modules/.bin/my-local-ip)}"
echo "Local IP is: ${LOCAL_IP}"

# Let's also just back this up in case.
mv -f src/config.json src/config.json.bak
cp src/config.json.minishift src/config.json
sed -i "s/192.168.64.2/$(minishift ip)/" src/config.json
sed -i "s/Syndesis/Syndesis - DEVELOPMENT/" src/config.json

oc replace --force -f - <<EOF
{
  "kind": "List",
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "v1",
      "kind": "Service",
      "metadata": {
        "labels": {
          "app": "syndesis",
          "component": "syndesis-ui"
        },
        "name": "syndesis-ui"
      },
      "spec": {
        "ports": [
          {
            "port": 80,
            "protocol": "TCP",
            "targetPort": 4200,
            "name": "http"
          }
        ],
        "selector": {}
      }
    },<commit_msg>Don't bail if src/config.json doesn't exist<commit_after>#!/bin/bash

set -euo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ..

# Lets try to detect the local machine ip..
LOCAL_IP="${SYNDESIS_DEV_LOCAL_IP:=$(./node_modules/.bin/my-local-ip)}"
echo "Local IP is: ${LOCAL_IP}"

# Let's also just back this up in case.
mv -f src/config.json src/config.json.bak || true
cp src/config.json.minishift src/config.json
sed -i "s/192.168.64.2/$(minishift ip)/" src/config.json
sed -i "s/Syndesis/Syndesis - DEVELOPMENT/" src/config.json

oc replace --force -f - <<EOF
{
  "kind": "List",
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "v1",
      "kind": "Service",
      "metadata": {
        "labels": {
          "app": "syndesis",
          "component": "syndesis-ui"
        },
        "name": "syndesis-ui"
      },
      "spec": {
        "ports": [
          {
            "port": 80,
            "protocol": "TCP",
            "targetPort": 4200,
            "name": "http"
          }
        ],
        "selector": {}
      }
    },
{'fraction_non_alphanumeric': 0.18743961352657004, 'fraction_numerical': 0.017391304347826087, 'mean_word_length': 2.010174418604651, 'pattern_counts': {'":': 34, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1849469', 'n_tokens_mistral': 786, 'n_tokens_neox': 749, 'n_words': 166}