Skip to content

Commit

Permalink
newline fixed here too
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPico authored Oct 12, 2023
1 parent 94c5158 commit 7c4d591
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/on_file_change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
table_html=""
table_html+="<table class=\"table table-striped table-bordered table-hover\">"
table_html+="<thead class="table-dark"><tr><th>File Name</th><th>File Size</th><th>Last Modified</th></tr></thead>"
table_html+=$'\n'
# Loop through all files in the directory
for file in $(find "$dir" -mindepth 1 -maxdepth 1 -type f ! -name "*.html" | sort)
do
Expand All @@ -59,6 +60,7 @@ jobs:
modified=$(git log -1 --format=%cd --date=format:'%d %b %Y %l:%M %p' -- "$file")
# Create a table row with the file information
table_html+="<tr><td><a class="file-link" href=\"$filename\">$filename</a></td><td>$filesize</td><td>$modified</td></tr>"
table_html+=$'\n'
fi
done
table_html+="</table>"
Expand All @@ -74,6 +76,7 @@ jobs:
table_html=""
table_html+="<table class=\"table table-striped table-bordered table-hover\">"
table_html+="<thead class="table-dark"><tr><th>Folder Name</th><th>File Count</th><th>Last Modified</th></tr></thead>"
table_html+=$'\n'
# Loop through all folders in the directory
for subdir in $(find "$release_dir" -mindepth 1 -maxdepth 1 -type d ! -name ".*" | sort)
do
Expand All @@ -83,6 +86,7 @@ jobs:
modified=$(git log -1 --format=%cd --date=format:'%d %b %Y %l:%M %p' -- "$subdir")
# Create a table row with the file information
table_html+="<tr><td><a class="file-link" href=\"$folder\">$folder</a></td><td>$filecount</td><td>$modified</td></tr>"
table_html+=$'\n'
done
table_html+="</table>"
# Add parent link (expect top level index)
Expand All @@ -96,6 +100,7 @@ jobs:
table_html=""
table_html+="<table class=\"table table-striped table-bordered table-hover\">"
table_html+="<thead class="table-dark"><tr><th>Folder Name</th><th>File Count</th><th>Last Modified</th></tr></thead>"
table_html+=$'\n'
# Loop through all folders in the directory
for subdir in $(find . -mindepth 1 -maxdepth 1 -type d ! -name ".*" | sort -rn)
do
Expand All @@ -105,6 +110,7 @@ jobs:
modified=$(git log -1 --format=%cd --date=format:'%d %b %Y %l:%M %p' -- "$subdir")
# Create a table row with the file information
table_html+="<tr><td><a class="file-link" href=\"$folder\">$folder</a></td><td>$filecount</td><td>$modified</td></tr>"
table_html+=$'\n'
done
table_html+="</table>"
# Assemble and save HTML
Expand All @@ -113,4 +119,4 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update file index pages
file_pattern: 'index.html **/index.html'
file_pattern: 'index.html **/index.html'

0 comments on commit 7c4d591

Please sign in to comment.