mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
split make file
This commit is contained in:
parent
1de61a8083
commit
ff74117fac
24 changed files with 249 additions and 172 deletions
9
test/repo/Makefile
Normal file
9
test/repo/Makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
REPO_TESTS=$(filter-out README.md Makefile,$(shell ls))
|
||||
|
||||
all: $(REPO_TESTS)
|
||||
|
||||
$(REPO_TESTS):
|
||||
chmod +x $*
|
||||
./$*
|
||||
|
||||
.PHONY: $(REPO_TESTS)
|
||||
39
test/repo/vars.sh
Normal file
39
test/repo/vars.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
vars=()
|
||||
|
||||
while read -r line
|
||||
do
|
||||
if ! [[ $line =~ ^# ]]
|
||||
then
|
||||
vars+=$(echo $line | cut -d= -f1 | tr [:upper:] [:lower:])
|
||||
fi
|
||||
if [[ $line =~ ^########## ]]
|
||||
then
|
||||
break
|
||||
fi
|
||||
done < ../../Makefile
|
||||
|
||||
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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue