Skip to content

Commit 3654be1

Browse files
committed
cmd-build-with-buildah: fix variant handling
The `variant` variable is set by `prepare_build`, which we're purposely not calling here.
1 parent 1700819 commit 3654be1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cmd-build-with-buildah

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ build_with_buildah() {
7070

7171
tmp_oci_archive_path=$(realpath "${tempdir}/out.ociarchive")
7272

73-
argsfile=build-args.conf
74-
if [ -n "${variant:-}" ]; then
73+
initconfig="src/config.json"
74+
if [ -f "${initconfig}" ]; then
75+
variant="$(jq --raw-output '."coreos-assembler.config-variant"' "${initconfig}")"
7576
argsfile=build-args-${variant}.conf
77+
else
78+
argsfile=build-args.conf
7679
fi
7780

7881
if [ -e "builds/$VERSION" ]; then

0 commit comments

Comments
 (0)