Merge pull request #640 from infosiftr/apply-fixes

Fix a few edge cases in "apply-templates.sh"
This commit is contained in:
yosifkit 2023-06-02 10:23:29 -07:00 committed by GitHub
commit f6711eebe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -32,9 +32,12 @@ generated_warning() {
for version; do
export version
if jq -e '.[env.version] | not' versions.json > /dev/null; then
echo "deleting $version ..."
if [ -d "$version" ]; then
rm -rf "$version"
fi
if jq -e '.[env.version] | not' versions.json > /dev/null; then
echo "skipping $version ..."
continue
fi
@ -43,6 +46,8 @@ for version; do
echo "processing $version/$variant ..."
mkdir -p "$version/$variant"
{
generated_warning
gawk -f "$jqt" "Dockerfile-$variant.template"
@ -56,6 +61,8 @@ for version; do
echo "processing $version/$variant/management ..."
mkdir -p "$version/$variant/management"
{
generated_warning
gawk -f "$jqt" Dockerfile-management.template