Skip to content

Commit

Permalink
generate: remove hardcoded distro config during DG rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubatrh authored and praiskup committed Dec 12, 2018
1 parent b056c22 commit 783ce42
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ EOF
}

for version in ${VERSIONS}; do
# Get a working combination of distgen options for this version
while read -r combination; do
# line looks like: --distro rhel-7-x86_64.yaml --multispec-selector version=9.4
echo "$combination" | grep "version=$version" &>/dev/null && break
done <<< "$DISTGEN_COMBINATIONS"
[ -z "$combination" ] && die "Could not find a working distgen options combination for version $version"

# copy targets
rules="$COPY_RULES"
core="cp \$< \$@"
Expand All @@ -123,10 +130,8 @@ for version in ${VERSIONS}; do

# distgen targets
rules="$DISTGEN_RULES"
# TODO: Drop terrible hack that we use fixed --distro here!
core="\$(DG) --multispec specs/multispec.yml \\
--template \"\$<\" --distro centos-7-x86_64.yaml \\
--multispec-selector version=\"$version\" --output \"\$@\""
--template \"\$<\" $combination --output \"\$@\""
creator="distgen"
parse_rules
DISTGEN_TARGETS+="$targets"
Expand Down

0 comments on commit 783ce42

Please sign in to comment.