tangled
alpha
login
or
join now
slices.network
/
quickslice
60
fork
atom
Auto-indexing service and GraphQL API for AT Protocol Records
quickslice.slices.network/
atproto
gleam
graphql
60
fork
atom
overview
issues
7
pulls
2
pipelines
feat(www-deploy): fingerprint CSS for cache busting
chadtmiller.com
2 months ago
bbcc4f2d
843a5e65
+12
1 changed file
expand all
collapse all
unified
split
scripts
deploy-cdn.sh
+12
scripts/deploy-cdn.sh
···
214
214
exit 1
215
215
fi
216
216
217
217
+
# Fingerprint styles.css for cache busting
218
218
+
echo "Fingerprinting styles.css..."
219
219
+
if [ -f "${LOCAL_DIR}/styles.css" ]; then
220
220
+
HASH=$(md5 -q "${LOCAL_DIR}/styles.css" | cut -c1-8)
221
221
+
mv "${LOCAL_DIR}/styles.css" "${LOCAL_DIR}/styles.${HASH}.css"
222
222
+
find "$LOCAL_DIR" -name "*.html" -exec sed -i '' "s|/styles.css|/styles.${HASH}.css|g" {} \;
223
223
+
echo -e "${GREEN} styles.css -> styles.${HASH}.css${NC}"
224
224
+
else
225
225
+
echo -e "${YELLOW} No styles.css found, skipping${NC}"
226
226
+
fi
227
227
+
echo ""
228
228
+
217
229
# Step 1: Upload all local files
218
230
echo "Uploading files..."
219
231
LOCAL_FILES_LIST=$(mktemp)