<commit_before>#!/bin/bash
# ------------------------------------------------------------------------
#
# Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
#
# ------------------------------------------------------------------------

set -e
prgdir=`dirname "$0"`
script_path=`cd "$prgdir"; pwd`

wso2_ppaas_version="4.1.0-SNAPSHOT"
wso2_base_image_version="4.1.0"
configurator_path=`cd ${script_path}/../../../components/org.wso2.ppaas.configurator/; pwd`
clean=false

if [ "$1" = "clean" ]; then
   clean=true
fi

if ${clean} ; then
   echo "----------------------------------"
   echo "Building configurator"
   echo "----------------------------------"
   pushd ${configurator_path}
   mvn clean install                                                                                      
   cp -v target/ppaas-configurator-${wso2_ppaas_version}.zip ${script_path}/packages/
   popd
fi

echo "----------------------------------"
echo "Building base docker image"
echo "----------------------------------"
sudo docker build -t wso2/base-image:${wso2_base_image_version} .
echo "Base docker image built successfully"
<commit_msg>Copy configurator to packages when building the docker base docker image by default<commit_after>#!/bin/bash
# ------------------------------------------------------------------------
#
# Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
#
# ------------------------------------------------------------------------

set -e
prgdir=`dirname "$0"`
script_path=`cd "$prgdir"; pwd`

wso2_ppaas_version="4.1.0-SNAPSHOT"
wso2_base_image_version="4.1.0"
configurator_path=`cd ${script_path}/../../../components/org.wso2.ppaas.configurator/; pwd`

echo "----------------------------------"
echo "Building Configurator"
echo "----------------------------------"
pushd ${configurator_path}
mvn clean install
cp -v target/ppaas-configurator-${wso2_ppaas_version}.zip ${script_path}/packages/
popd

echo "----------------------------------"
echo "Building base docker image"
echo "----------------------------------"
sudo docker build -t wso2/base-image:${wso2_base_image_version} .
echo "Base docker image built successfully"

{'fraction_non_alphanumeric': 0.26573643410852715, 'fraction_numerical': 0.017054263565891473, 'mean_word_length': 1.898472596585804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4107687', 'n_tokens_mistral': 891, 'n_tokens_neox': 842, 'n_words': 281}