<commit_before>#!/bin/bash

# This script will copy the Azure image from the CoreOS build bucket into
# Azure storage, create an Azure VM image, and replicate it to all regions. It
# to be run in an environment where the azure-xplat-cli has been installed and
# configured with the production credentials and (optionally) SUBSCRIPTION_ID
# is defined, containing the subscription GUID.

DIR=$(dirname $0)
. $DIR/common.sh

set -e

WORKDIR=$(mktemp --directory)
trap "rm --force --recursive ${WORKDIR}" SIGINT SIGTERM EXIT

IMAGE_PATH="${WORKDIR}/coreos_production_azure_image.vhd"

UGROUP="${1^}"
LGROUP="${1,}"
VERSION=$2
DATE=$3
GS_BUCKET_URL="gs://builds.release.core-os.net/${LGROUP}/boards/amd64-usr/${VERSION}/coreos_production_azure_image.vhd.bz2"

if [[ -z $UGROUP || -z $VERSION ]]; then
	echo "Usage: $0 <group> <version> [<published date>]"
	exit 2
fi

echo "Downloading image from CoreOS build bucket..."
gsutil cp ${GS_BUCKET_URL} "${IMAGE_PATH}.bz2"
<commit_msg>oem/azure: verify GPG signature of image<commit_after>#!/bin/bash

# This script will copy the Azure image from the CoreOS build bucket into
# Azure storage, create an Azure VM image, and replicate it to all regions. It
# to be run in an environment where the azure-xplat-cli has been installed and
# configured with the production credentials and (optionally) SUBSCRIPTION_ID
# is defined, containing the subscription GUID.

DIR=$(dirname $0)
. $DIR/common.sh

set -e

WORKDIR=$(mktemp --directory)
trap "rm --force --recursive ${WORKDIR}" SIGINT SIGTERM EXIT

IMAGE_PATH="${WORKDIR}/coreos_production_azure_image.vhd"

UGROUP="${1^}"
LGROUP="${1,}"
VERSION=$2
DATE=$3
GS_BUCKET_URL="gs://builds.release.core-os.net/${LGROUP}/boards/amd64-usr/${VERSION}/coreos_production_azure_image.vhd"

if [[ -z $UGROUP || -z $VERSION ]]; then
	echo "Usage: $0 <group> <version> [<published date>]"
	exit 2
fi

echo "Downloading image from CoreOS build bucket..."
gsutil cp "${GS_BUCKET_URL}.bz2" "${IMAGE_PATH}.bz2"
gsutil cp "${GS_BUCKET_URL}.bz2.sig" "${IMAGE_PATH}.bz2.sig"
gpg --verify "${IMAGE_PATH}.bz2.sig"

{'fraction_non_alphanumeric': 0.14093314093314094, 'fraction_numerical': 0.012025012025012025, 'mean_word_length': 5.081871345029239, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '5246196', 'n_tokens_mistral': 722, 'n_tokens_neox': 699, 'n_words': 218}