Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.1k
FixpackageTimestamp
setting for static assets#13159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
dwickern commentedFeb 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It's possible that Assets/ packageTimestamp:=Package.keepTimestamps would be a reasonable default. Personally I would have to revert it back because I use Edit: actually, this default would be the best of both worlds Assets/ packageTimestamp:= sys.env.get("SOURCE_DATE_EPOCH") .map(_.toLong*1000) .orElse(Package.keepTimestamps) |
Yeah, I think this is the best solution. This basically restores sbt 1.4.0 behaviour (for Assets, at least), while also takes |
sbt 1.5.0 added a
ThisBuild / packageTimestamp
setting to fix Play's last-modified header. The problem is, it doesn't work. SettingThisBuild / packageTimestamp
has no effect on Play's packaged assets.This PR fixes the settings to respect
ThisBuild / packageTimestamp
for Play assets. Additionally, there is anAssets / packageTimestamp
setting which can set asset timestamps differently from other packaging.For example, this configuration is valid:
I updated the docs to recommend setting
packageTimestamp
instead ofpackageOptions
.Fixes#10572
Pull Request Checklist