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

set -euo pipefail

PARENT_PATH=$(pwd)
KOLIBRI_DOCKER_PATH="$PARENT_PATH/windows_installer_docker_build"
KOLIBRI_WINDOWS_PATH="$KOLIBRI_DOCKER_PATH/kolibri-installer-windows/windows"

mkdir dist
buildkite-agent artifact download 'dist/*.whl' dist/
make writeversion

# Clone kolibri windows installer base in develop branch.
cd $KOLIBRI_DOCKER_PATH
git clone https://github.com/learningequality/kolibri-installer-windows.git
cd kolibri-installer-windows
git checkout v1.0.0

# Copy kolbri whl file at KOLIBRI_WINDOWS_PATH path.
cd $PARENT_PATH
cp $PARENT_PATH/dist/*.whl $KOLIBRI_WINDOWS_PATH

# Build kolibri windows installer docker image.
cd $KOLIBRI_DOCKER_PATH
KOLIBRI_VERSION=$(cat $PARENT_PATH/kolibri/VERSION)
DOCKER_BUILD_CMD="docker build -t $KOLIBRI_VERSION-build ."
$DOCKER_BUILD_CMD
if [ $? -ne 0 ]; then
    echo ".. Abort!  Error running $DOCKER_BUILD_CMD."
    exit 1
fi
<commit_msg>Use mkdir -p to prevent failure if dist exists.<commit_after>#!/usr/bin/env bash

set -euo pipefail

PARENT_PATH=$(pwd)
KOLIBRI_DOCKER_PATH="$PARENT_PATH/windows_installer_docker_build"
KOLIBRI_WINDOWS_PATH="$KOLIBRI_DOCKER_PATH/kolibri-installer-windows/windows"

mkdir -p dist
buildkite-agent artifact download 'dist/*.whl' dist/
make writeversion

# Clone kolibri windows installer base in develop branch.
cd $KOLIBRI_DOCKER_PATH
git clone https://github.com/learningequality/kolibri-installer-windows.git
cd kolibri-installer-windows
git checkout v1.0.0

# Copy kolbri whl file at KOLIBRI_WINDOWS_PATH path.
cd $PARENT_PATH
cp $PARENT_PATH/dist/*.whl $KOLIBRI_WINDOWS_PATH

# Build kolibri windows installer docker image.
cd $KOLIBRI_DOCKER_PATH
KOLIBRI_VERSION=$(cat $PARENT_PATH/kolibri/VERSION)
DOCKER_BUILD_CMD="docker build -t $KOLIBRI_VERSION-build ."
$DOCKER_BUILD_CMD
if [ $? -ne 0 ]; then
    echo ".. Abort!  Error running $DOCKER_BUILD_CMD."
    exit 1
fi

{'fraction_non_alphanumeric': 0.09501312335958005, 'fraction_numerical': 0.005249343832020997, 'mean_word_length': 5.641114982578397, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4107339', 'n_tokens_mistral': 757, 'n_tokens_neox': 728, 'n_words': 157}