Skip to content

Commit 366386e

Browse files
Update build_map.sh
1 parent 2c13d73 commit 366386e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/build_map.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ echo "const _just_buildManifest = [];" > deploy/_just/static/$BUILD_ID/buildMani
3030

3131
echo "Build Map:"
3232
FILE_ID=1
33+
TOTAL_FILES=$(find deploy -mindepth 1 -print | wc -l)
3334
find deploy -mindepth 1 -print | while read -r path; do
3435
relative_path=${path#deploy/}
35-
echo "$relative_path"
36+
37+
if [ "$FILE_ID" -eq 1 ]; then
38+
echo "$relative_path"
39+
elif [ "$FILE_ID" -eq "$TOTAL_FILES" ]; then
40+
echo "$relative_path"
41+
else
42+
echo "$relative_path"
43+
fi
3644

3745
if [ -f "$path" ]; then
3846
case "${path##*.}" in
@@ -47,4 +55,6 @@ find deploy -mindepth 1 -print | while read -r path; do
4755
esac
4856
echo " _just_buildManifest.push({\"type\": \"$type\", \"path\": \"$relative_path\"});" >> deploy/_just/static/$BUILD_ID/buildManifest.js
4957
fi
58+
59+
FILE_ID=$((FILE_ID + 1))
5060
done

0 commit comments

Comments
 (0)