<commit_before>#!/bin/sh

#### 
#  The following variables must be set in the build.rc file before executing this script
####
#ARTIFACT_URL=
#ARTIFACT_STREAM=

#DOCKER_EMAIL=
#DOCKER_USERNAME=
#DOCKER_PASSWORD=

source ./build.rc

####
# UCD_VERSION will be read from the stream file on the artifact server so no need to set it
####
UCD_VERSION=

curl -O "$ARTIFACT_URL/urbancode/ibm-ucd/$ARTIFACT_STREAM.txt"
UCD_VERSION=`cat $ARTIFACT_STREAM.txt`  # i.e. latest or dev or qa or vnext etc... file will contain just the version number
rm -f $ARTIFACT_STREAM.txt

rm -rf artifacts/
curl -O "$ARTIFACT_URL/urbancode/ibm-ucd/$UCD_VERSION/ibm-ucd.zip"
unzip -q ibm-ucd.zip -d artifacts/
rm -f ibm-ucd.zip

docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker build -t stackinabox/urbancode-deploy:$UCD_VERSION .
docker push stackinabox/urbancode-deploy:$UCD_VERSION<commit_msg>fix removal of artifacts folder<commit_after>#!/bin/sh

#### 
#  The following variables must be set in the build.rc file before executing this script
####
#ARTIFACT_URL=
#ARTIFACT_STREAM=

#DOCKER_EMAIL=
#DOCKER_USERNAME=
#DOCKER_PASSWORD=

source ./build.rc

####
# UCD_VERSION will be read from the stream file on the artifact server so no need to set it
####
UCD_VERSION=

curl -O "$ARTIFACT_URL/urbancode/ibm-ucd/$ARTIFACT_STREAM.txt"
UCD_VERSION=`cat $ARTIFACT_STREAM.txt`  # i.e. latest or dev or qa or vnext etc... file will contain just the version number
rm -f $ARTIFACT_STREAM.txt

rm -rf artifacts/*
curl -O "$ARTIFACT_URL/urbancode/ibm-ucd/$UCD_VERSION/ibm-ucd.zip"
unzip -q ibm-ucd.zip -d artifacts/
rm -f ibm-ucd.zip

docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker build -t stackinabox/urbancode-deploy:$UCD_VERSION .
docker push stackinabox/urbancode-deploy:$UCD_VERSION
{'fraction_non_alphanumeric': 0.12219178082191781, 'fraction_numerical': 0.0, 'mean_word_length': 4.796825396825397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7668049', 'n_tokens_mistral': 742, 'n_tokens_neox': 696, 'n_words': 185}