diff --git a/debian/postinst b/debian/postinst index 67360059..4c40d718 100644 --- a/debian/postinst +++ b/debian/postinst @@ -10,6 +10,12 @@ do_configure() { # Set document root permissions chown -R root:root /usr/share/yunohost/admin + + # Replace RANDOMID with a random hash to invalidate + # old cache ... we generate this locally on each machine + # to avoid leaking stuff like the version + RANDOMID=$(openssl rand -hex 4) + sed -i "s/RANDOMID/$RANDOMID/g" /usr/share/yunohost/admin/index.html } # summary of how this script can be called: diff --git a/debian/rules b/debian/rules index b0315118..3cd60cb6 100755 --- a/debian/rules +++ b/debian/rules @@ -15,10 +15,6 @@ TMPDIR = $$(pwd)/debian/yunohost-admin dh $@ override_dh_auto_build: - # Replace VERSION with current package version to prevent web browser - # to serve old css/js files - sed -i 's/VERSION/$(DEBVERS)/g' src/index.html - # Run npm/bower/gulp cd src ; npm --progress false --loglevel warn --color false install cd src ; node_modules/gulp/bin/gulp.js build diff --git a/src/index.html b/src/index.html index 6577bcfe..4d032f17 100644 --- a/src/index.html +++ b/src/index.html @@ -7,9 +7,9 @@ - + - +