@@ -43,16 +43,23 @@ generate_strings() {
43
43
random_strings=($( generate_strings 1 16) )
44
44
clearCache_name=${random_strings[0]} c
45
45
46
+ echo " [" > deploy/api/build-manifest
47
+ echo " " > deploy/api/build-manifest.txt
48
+ echo " [" > deploy/api/_just_build-manifest
49
+ echo " " > deploy/api/_just_build-manifest.txt
50
+
46
51
echo " $( cat $GITHUB_ACTION_PATH /src/buildManifest_start.js) " > deploy/_just/static/$BUILD_ID /buildManifest.js
47
52
echo " $( cat $GITHUB_ACTION_PATH /src/_justManifest_start.js) " > deploy/_just/static/$BUILD_ID /_justManifest.js
48
- echo " $( cat $GITHUB_ACTION_PATH /src/clearCache.js) " > deploy/_just/static/chunks/$clearCache_name .js
53
+ echo " $( cat $GITHUB_ACTION_PATH /src/insert/ clearCache.js) " > deploy/_just/static/chunks/$clearCache_name .js
49
54
find _just_data -mindepth 1 -print | while read -r path; do
50
55
relative_path=${path# _just_data/ }
51
56
first_line=$( head -n 1 " $path " )
52
57
if [ -f " $path " ]; then
53
58
if [[ " $first_line " != " // _just hide" ||
54
59
" $first_line " != " // _just doNotModify+hide" ]]; then
55
60
echo " _just_Manifest0.push(\" $relative_path \" );" >> deploy/_just/static/$BUILD_ID /_justManifest.js
61
+ echo " \" $relative_path \" ," >> deploy/api/_just_build-manifest
62
+ echo " $relative_path \n" >> deploy/api/_just_build-manifest.txt
56
63
fi
57
64
fi
58
65
done
@@ -140,7 +147,10 @@ find deploy -mindepth 1 -print | while read -r path; do
140
147
# Build manifest entry
141
148
if [[ " $first_line " != " // _just hide" ||
142
149
" $first_line " != " // _just doNotModify+hide" ]]; then
143
- echo " _just_buildManifest0.push({\" type\" : \" $type \" , \" path\" : \" $relative_path \" , \" size\" : {\" bytes\" : $file_size , \" string\" : \" $( human_readable_size $file_size ) \" }});" >> deploy/_just/static/$BUILD_ID /buildManifest.js
150
+ buildManifestJSONString=" {\" type\" : \" $type \" , \" path\" : \" $relative_path \" , \" size\" : {\" bytes\" : $file_size , \" string\" : \" $( human_readable_size $file_size ) \" }}"
151
+ echo " _just_buildManifest0.push($buildManifestJSONString );" >> deploy/_just/static/$BUILD_ID /buildManifest.js
152
+ echo " $buildManifestJSONString " >> deploy/api/build-manifest
153
+ echo " ($type ) $relative_path - $( human_readable_size $file_size ) \n" >> deploy/api/build-manifest.txt
144
154
fi
145
155
fi
146
156
@@ -167,3 +177,7 @@ for html_file in deploy/*.html; do
167
177
echo " </body>" >> " $html_file "
168
178
echo " </html>" >> " $html_file "
169
179
done
180
+
181
+ # Add API Endpoints
182
+ cp deploy/api/_just_build-manifest deploy/api/_just_build-manifest.json
183
+ cp deploy/api/build-manifest deploy/api/build-manifest.json
0 commit comments