Skip to content

Commit

Permalink
balena-lib: Use balena.yml if present
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Alex Gonzalez <[email protected]>
  • Loading branch information
alexgg committed Jun 16, 2022
1 parent 80d175a commit a7473e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion automation/include/balena-lib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ __find_contract_by_slug() {
local _contracts
local _slug

_contracts=$(find "${device_dir}/contracts/" -name "contract.json" -print 2>/dev/null)
_contracts=$(find "${device_dir}" -name "balena.yml" -print 2>/dev/null)
if [ -z "${_contracts}" ]; then
_contracts=$(find "${device_dir}/contracts/" -name "contract.json" -print 2>/dev/null)
fi
for contract in ${_contracts}; do
_slug=$(jq --raw-output .slug < "${contract}")
if [ "${_slug}" = "${_tslug}" ]; then
Expand Down

0 comments on commit a7473e3

Please sign in to comment.