diff --git a/.github/workflows/githubpages.yml b/.github/workflows/githubpages.yml
index d1e9ba8f..3bf05ef2 100644
--- a/.github/workflows/githubpages.yml
+++ b/.github/workflows/githubpages.yml
@@ -34,6 +34,36 @@ jobs:
run: sed -i 's///g' src/WebConverter/bin/Release/net7.0/publish/wwwroot/index.html
- name: Create .nojekyll file
run: touch src/WebConverter/bin/Release/net7.0/publish/wwwroot/.nojekyll
+ - name: Update service-worker-assets.js hashes
+ working-directory: src/WebConverter/bin/Release/net7.0/publish/wwwroot
+ run: |
+ jsFile=$( service-worker-assets.js
- name: Upload pages artifact
uses: actions/upload-pages-artifact@main
with:
diff --git a/src/WebConverter/Shared/NavMenu.razor b/src/WebConverter/Shared/NavMenu.razor
index 9725e29c..45d10eb4 100644
--- a/src/WebConverter/Shared/NavMenu.razor
+++ b/src/WebConverter/Shared/NavMenu.razor
@@ -26,9 +26,12 @@
@SemanticVersion
-
- @CommitIdShort
-
+ @if (!string.IsNullOrEmpty(CommitId))
+ {
+
+ @CommitIdShort
+
+ }
@@ -47,7 +50,7 @@
private static string? ProductVersion { get; set; }
private static string? SemanticVersion => $"v{ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.First()}";
private static string? ReleaseUrl => SemanticVersion != null ? $"{GitHubUrl}/releases/tag/{SemanticVersion}" : GitHubUrl;
- private static string? CommitId => ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.Last();
+ private static string? CommitId => ProductVersion != null && ProductVersion.Contains('+') ? ProductVersion?.Split('+', StringSplitOptions.RemoveEmptyEntries)?.Last() : null;
private static string? CommitIdShort => CommitId?.Substring(0, Math.Min(7, CommitId.Length));
private static string CommitUrl => CommitId != null ? $"{GitHubUrl}/commit/{CommitId}" : GitHubUrl;
diff --git a/src/WebConverter/WebConverter.csproj b/src/WebConverter/WebConverter.csproj
index 1d5e7157..8badc794 100644
--- a/src/WebConverter/WebConverter.csproj
+++ b/src/WebConverter/WebConverter.csproj
@@ -40,6 +40,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+