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
exit 1
215
fi
216
0
0
0
0
0
0
0
0
0
0
0
0
217
# Step 1: Upload all local files
218
echo "Uploading files..."
219
LOCAL_FILES_LIST=$(mktemp)
···
214
exit 1
215
fi
216
217
+
# Fingerprint styles.css for cache busting
218
+
echo "Fingerprinting styles.css..."
219
+
if [ -f "${LOCAL_DIR}/styles.css" ]; then
220
+
HASH=$(md5 -q "${LOCAL_DIR}/styles.css" | cut -c1-8)
221
+
mv "${LOCAL_DIR}/styles.css" "${LOCAL_DIR}/styles.${HASH}.css"
222
+
find "$LOCAL_DIR" -name "*.html" -exec sed -i '' "s|/styles.css|/styles.${HASH}.css|g" {} \;
223
+
echo -e "${GREEN} styles.css -> styles.${HASH}.css${NC}"
224
+
else
225
+
echo -e "${YELLOW} No styles.css found, skipping${NC}"
226
+
fi
227
+
echo ""
228
+
229
# Step 1: Upload all local files
230
echo "Uploading files..."
231
LOCAL_FILES_LIST=$(mktemp)