<commit_before>#!/bin/bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

url='git://github.com/docker-library/hello-world'

echo '# maintainer: InfoSiftr <<EMAIL>> (@infosiftr)'

commit="$(git log -1 --format='format:%H' -- .)"

versionAliases=( latest )

echo
for va in "${versionAliases[@]}"; do
	echo "$va: ${url}@${commit}"
done<commit_msg>Enhance "generate-stackbrew-library.sh" to only take into account changes to the Dockerfile or files from COPY in the Dockerfile for choosing the commit hash for a particular directory<commit_after>#!/bin/bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

url='git://github.com/docker-library/hello-world'

echo '# maintainer: InfoSiftr <<EMAIL>> (@infosiftr)'

commit="$(git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"

versionAliases=( latest )

echo
for va in "${versionAliases[@]}"; do
	echo "$va: ${url}@${commit}"
done
{'fraction_non_alphanumeric': 0.20225872689938398, 'fraction_numerical': 0.004106776180698152, 'mean_word_length': 5.018518518518518, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, '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': '5298382', 'n_tokens_mistral': 356, 'n_tokens_neox': 337, 'n_words': 98}