forked from freifunk-darmstadt/site-ffda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: provide means to override build-meta output
Provide a way to override properties determined in the build-meta step. This allows to alter specific settings for a build if a special build for e.g. a automatic installation image is desired. Signed-off-by: David Bauer <[email protected]>
- Loading branch information
1 parent
a424d74
commit 041c8f4
Showing
4 changed files
with
73 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Validate no files in .github/overrides/build-meta contain newlines | ||
|
||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$(dirname "$0")" | ||
|
||
OVERRIDES_DIR="$SCRIPT_DIR/overrides/build-meta" | ||
|
||
FILES_WITH_TWO_LINES="" | ||
|
||
# Find all files which contain at lest two lines | ||
while IFS= read -r -d '' file | ||
do | ||
if [ "$(wc -l < "$file")" -gt 1 ]; then | ||
FILES_WITH_TWO_LINES="$FILES_WITH_TWO_LINES $file" | ||
fi | ||
done < <(find "$OVERRIDES_DIR" -type f -print0) | ||
|
||
# Check for newlines in overrides | ||
if [ -n "$FILES_WITH_TWO_LINES" ]; then | ||
echo "The following files contain newlines:" | ||
echo "$FILES_WITH_TWO_LINES" | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters