Skip to content

Commit

Permalink
Remove .git* dirs and manifest.yaml from manifest creation (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat authored Oct 31, 2024
1 parent ff9dc91 commit c35174f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/generate_manifests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ module use "$yamf_module_path"
module load "$yamf_module_name"

# This command finds all the leaf directories: see https://unix.stackexchange.com/questions/68577/find-directories-that-do-not-contain-subdirectories/203991#203991
dir_without_subdir=$(find "$start_dir" -type d -links 2 ! -empty)
dir_without_subdir=$(find "$start_dir" -type d -links 2 ! -ipath "*.git*" ! -empty)

for dir in $dir_without_subdir; do
echo "Working on $dir:"
# Find all the files that we want to turn into manifests
files=$(find "$dir" -maxdepth 1 -type f -printf '%f ')
files=$(find "$dir" -maxdepth 1 -type f ! -name "manifest.yaml" -printf '%f ')
if [ -n "$files" ]; then
# If there are some files, add them using yamf
cd "$dir" || exit 2
Expand Down

0 comments on commit c35174f

Please sign in to comment.