mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
update test
This commit is contained in:
parent
f16d8e4e0b
commit
327999d887
4 changed files with 26 additions and 63 deletions
|
|
@ -74,6 +74,7 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
rootfs_size:
|
rootfs_size:
|
||||||
description: The size (in GiB) for the squashfs runtime volume
|
description: The size (in GiB) for the squashfs runtime volume
|
||||||
|
default: "2"
|
||||||
secure_boot_key_url:
|
secure_boot_key_url:
|
||||||
description: Secure boot key that is installed from URL location
|
description: Secure boot key that is installed from URL location
|
||||||
required: false
|
required: false
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,9 @@ for line in action_lines:
|
||||||
inputs[var_name]['default_value'] = parts[1].strip().strip('"')
|
inputs[var_name]['default_value'] = parts[1].strip().strip('"')
|
||||||
elif line.startswith(' '):
|
elif line.startswith(' '):
|
||||||
var_name = line.strip().strip(':').lower()
|
var_name = line.strip().strip(':').lower()
|
||||||
if var_name in inputs:
|
if not var_name in inputs:
|
||||||
inputs[var_name][action] = True
|
|
||||||
else:
|
|
||||||
print("WARNING: " + var_name + " found in action.yml but not Makefile")
|
|
||||||
inputs[var_name] = {}
|
inputs[var_name] = {}
|
||||||
inputs[var_name]['action'] = True
|
inputs[var_name]['action'] = True
|
||||||
else:
|
else:
|
||||||
at_inputs = False
|
at_inputs = False
|
||||||
|
|
||||||
|
|
@ -97,9 +94,25 @@ for line in readme_lines:
|
||||||
var_name = parts[1].strip().lower()
|
var_name = parts[1].strip().lower()
|
||||||
if not var_name in inputs:
|
if not var_name in inputs:
|
||||||
print("ERROR: " + var_name + " is not listed in action.yml or Makefile")
|
print("ERROR: " + var_name + " is not listed in action.yml or Makefile")
|
||||||
inputs[var_name] = {}
|
errors += 1
|
||||||
print(inputs[var_name])
|
continue
|
||||||
var_description = parts[2].strip()
|
if 'description' in inputs[var_name]:
|
||||||
var_default_value = parts[3].strip()
|
if parts[2].strip() != inputs[var_name]['description']:
|
||||||
var_action = parts[4].strip()
|
print("WARNING: " + var_name + " description in README.md does not match action.yml")
|
||||||
var_makefile = parts[5].strip()
|
if 'default_value' in inputs[var_name]:
|
||||||
|
if not parts[3].strip().strip('"').startswith('*'):
|
||||||
|
if inputs[var_name]['default_value'] == "":
|
||||||
|
if parts[3].strip().strip('"') != '\\[empty\\]':
|
||||||
|
print("ERROR: " + var_name + " default value in README.md does not match action.yml")
|
||||||
|
errors += 1
|
||||||
|
elif parts[3].strip().strip('"') != inputs[var_name]['default_value']:
|
||||||
|
print("ERROR: " + var_name + " default value in README.md does not match action.yml")
|
||||||
|
errors += 1
|
||||||
|
if 'action' in inputs[var_name] and inputs[var_name]['action']:
|
||||||
|
if parts[4].strip() != ':white_check_mark:':
|
||||||
|
print("WARNING: " + var_name + " not labeled as in action.yml in the README.md")
|
||||||
|
if 'makefile' in inputs[var_name] and inputs[var_name]['makefile']:
|
||||||
|
if parts[4].strip() != ':white_check_mark:':
|
||||||
|
print("WARNING: " + var_name + " not labeled as in Makefile in the README.md")
|
||||||
|
|
||||||
|
exit(errors)
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
makefile = open('../../Makefile.inputs', 'r')
|
|
||||||
makefile_lines = makefile.readlines()
|
|
||||||
|
|
||||||
vars = []
|
|
||||||
|
|
||||||
for line in makefile_lines:
|
|
||||||
if line.startswith('#'):
|
|
||||||
makefile_lines.remove(line)
|
|
||||||
parts = line.split('=', 1)
|
|
||||||
vars += { parts[0]: parts[1] }
|
|
||||||
|
|
||||||
print(vars)
|
|
||||||
|
|
||||||
vars=()
|
|
||||||
default_values=()
|
|
||||||
|
|
||||||
while read -r line
|
|
||||||
do
|
|
||||||
if ! [[ $line =~ ^# ]]
|
|
||||||
then
|
|
||||||
vars+=$(echo $line | cut -d= -f1 | tr [:upper:] [:lower:])
|
|
||||||
fi
|
|
||||||
done < ../../Makefile.inputs
|
|
||||||
|
|
||||||
result=0
|
|
||||||
|
|
||||||
for var in $vars
|
|
||||||
do
|
|
||||||
grep "^| ${var}" README.md > /dev/null
|
|
||||||
if [[ $? != 0 ]]
|
|
||||||
then
|
|
||||||
echo "$var not found in README.md"
|
|
||||||
result=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for var in $vars
|
|
||||||
do
|
|
||||||
grep "^ ${var}:" action.yml > /dev/null
|
|
||||||
if [[ $? != 0 ]]
|
|
||||||
then
|
|
||||||
echo "$var not found in action.yml"
|
|
||||||
result=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit ${result}
|
|
||||||
|
|
@ -22,7 +22,6 @@ popd > /dev/null
|
||||||
if [[ -n "${FLATPAK_DIR}" ]]
|
if [[ -n "${FLATPAK_DIR}" ]]
|
||||||
then
|
then
|
||||||
pushd "${FLATPAK_DIR}" > /dev/null
|
pushd "${FLATPAK_DIR}" > /dev/null
|
||||||
chmod -R ugo=rX .
|
|
||||||
for file in $(find repo)
|
for file in $(find repo)
|
||||||
do
|
do
|
||||||
if [[ "${file}" == "repo/.lock" ]]
|
if [[ "${file}" == "repo/.lock" ]]
|
||||||
|
|
@ -30,6 +29,7 @@ then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "-map ${PWD}/${file} flatpak/${file}"
|
echo "-map ${PWD}/${file} flatpak/${file}"
|
||||||
|
echo "-chmod 0444 ${file}"
|
||||||
done
|
done
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue