Skip to content

Commit

Permalink
Fix cache busting script
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Sep 19, 2024
1 parent 8c932f4 commit f5a51f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN flutter pub get
RUN flutter pub run build_runner build --delete-conflicting-outputs
RUN flutter build web --release
# Cache busting so that users don't have to hard refresh
RUN RANDOMVALUE=$RANDOM && \
RUN RANDOMVALUE=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13` && \
mv build/web/flutter_bootstrap.js build/web/flutter_bootstrap.$RANDOMVALUE.js && \
mv build/web/main.dart.js build/web/main.dart.$RANDOMVALUE.js && \
find build/web/ -type f -exec sed -i -e 's/flutter_bootstrap.js/flutter_bootstrap.'$RANDOMVALUE'.js/g' {} \; && \
Expand Down

0 comments on commit f5a51f9

Please sign in to comment.