Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Fix cache buster for release mode (#29)

Leendert de Borstd51ae8d91309
diff --git a/src/AliasVault.WebApp/AliasVault.WebApp.csproj b/src/AliasVault.WebApp/AliasVault.WebApp.csproj
index 2cc039857..a4b5b47a3 100644
--- a/src/AliasVault.WebApp/AliasVault.WebApp.csproj
+++ b/src/AliasVault.WebApp/AliasVault.WebApp.csproj
@@ -5,21 +5,21 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
- <CacheBuster Condition=" '$(Configuration)' == 'Release' ">$(UtcNow:yyyyMMddHHmmss)</CacheBuster>
- <CacheBuster Condition=" '$(Configuration)' != 'Release' ">dev</CacheBuster>
+ <BuildVersion>$([System.DateTime]::UtcNow.ToString("yyyy-MM-dd HH:mm:ss"))</BuildVersion>
</PropertyGroup>
<Target Name="GenerateCacheBustedIndexHtml" BeforeTargets="Build">
- <Exec Command="dotnet msbuild -target:ReplaceText -property:CacheBuster=$(CacheBuster)" />
+ <Exec Command="dotnet msbuild -t:ReplaceText -p:CacheBuster=$(CacheBuster);BuildVersion='$(BuildVersion)'" />
</Target>
<Target Name="ReplaceText">
- <Exec Command="sed 's/@CacheBuster/$(CacheBuster)/g' wwwroot/index.template.html > wwwroot/index.html" />
+ <Exec Command="sed 's/@CacheBuster/$(CacheBuster)/g;s/@BuildVersion/$(BuildVersion)/g' wwwroot/index.template.html > wwwroot/index.html" />
</Target>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\net8.0\AliasVault.WebApp.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <CacheBuster>dev</CacheBuster>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
@@ -27,6 +27,7 @@
<DocumentationFile>bin\Release\net8.0\AliasVault.WebApp.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Optimize>True</Optimize>
+ <CacheBuster>$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss"))</CacheBuster>
</PropertyGroup>
<ItemGroup>
diff --git a/src/AliasVault.WebApp/Properties/launchSettings.json b/src/AliasVault.WebApp/Properties/launchSettings.json
index a611e5baa..79aed9036 100644
--- a/src/AliasVault.WebApp/Properties/launchSettings.json
+++ b/src/AliasVault.WebApp/Properties/launchSettings.json
@@ -19,6 +19,16 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
+ "http-release": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
+ "applicationUrl": "http://localhost:5067",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Release"
+ }
+ },
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
diff --git a/src/AliasVault.WebApp/wwwroot/index.template.html b/src/AliasVault.WebApp/wwwroot/index.template.html
index 4c6664ec1..ce411cd60 100644
--- a/src/AliasVault.WebApp/wwwroot/index.template.html
+++ b/src/AliasVault.WebApp/wwwroot/index.template.html
@@ -3,18 +3,22 @@
<head>
<!--
+ ==========================================================================================================
- db 88 88 8b d8 88
- d88b 88 "" `8b d8' 88 ,d
- d8'`8b 88 `8b d8' 88 88
- d8' `8b 88 88 ,adPPYYba, ,adPPYba, `8b d8' ,adPPYYba, 88 88 88 MM88MMM
- d8YaaaaY8b 88 88 "" `Y8 I8[ "" `8b d8' "" `Y8 88 88 88 88
- d8""""""""8b 88 88 ,adPPPPP88 `"Y8ba, `8b d8' ,adPPPPP88 88 88 88 88
- d8' `8b 88 88 88, ,88 aa ]8I `888' 88, ,88 "8a, ,a88 88 88,
-d8' `8b 88 88 `"8bbdP"Y8 `"YbbdP"' `8' `"8bbdP"Y8 `"YbbdP'Y8 88 "Y888
+ db 88 88 8b d8 88
+ d88b 88 "" `8b d8' 88 ,d
+ d8'`8b 88 `8b d8' 88 88
+ d8' `8b 88 88 ,adPPYYba, ,adPPYba, `8b d8' ,adPPYYba, 88 88 88 MM88MMM
+ d8YaaaaY8b 88 88 "" `Y8 I8[ "" `8b d8' "" `Y8 88 88 88 88
+ d8""""""""8b 88 88 ,adPPPPP88 `"Y8ba, `8b d8' ,adPPPPP88 88 88 88 88
+ d8' `8b 88 88 88, ,88 aa ]8I `888' 88, ,88 "8a, ,a88 88 88,
+ d8' `8b 88 88 `"8bbdP"Y8 `"YbbdP"' `8' `"8bbdP"Y8 `"YbbdP'Y8 88 "Y888
+ ==========================================================================================================
AliasVault - Free open-source password manager.
+ Build (UTC): @BuildVersion
+
Source code: https://github.com/lanedirt/AliasVault
License: MIT
-->