Fixing the problem in the manifest and the template that caused the issues, hence undoing the previous fix.
Context
Original implementation by @fancsali failed to export appropriate variables (signed_by and forcedarch) from the manifest to the template, so the template was missing those every time - whether the actual parameters have been provided in the first place or not.
The missing or unset variables in the template caused an issue anyway, as the template is coded in a defensive way, and forces variables to be set by calling set -u.
The immediate issue of the template failing was addressed in 2277ec5 by @sideeffect42 when merging the code.
However, I discovered the original issue of the parameters never making through (even if set) recently - which essentially made those completely ignored and useless.
Fix approach
Reverting the fix (2277ec5), and re-doing the original solution properly:
Export forcedarch and signed_by in the manifest
Update the template to use a default empty value if those are unset - so we can keep set -u for safety
Re-introducing the "append and trim" logic, to keep the template short and concise
Fixing the problem in the manifest and the template that caused the issues, hence undoing the previous fix.
Context
Original implementation by @fancsali failed to export appropriate variables (
signed_by
andforcedarch
) from the manifest to the template, so the template was missing those every time - whether the actual parameters have been provided in the first place or not.The missing or unset variables in the template caused an issue anyway, as the template is coded in a defensive way, and forces variables to be set by calling
set -u
.The immediate issue of the template failing was addressed in 2277ec5 by @sideeffect42 when merging the code.
However, I discovered the original issue of the parameters never making through (even if set) recently - which essentially made those completely ignored and useless.
Fix approach
Reverting the fix (2277ec5), and re-doing the original solution properly:
forcedarch
andsigned_by
in themanifest
set -u
for safety