From b9a08ec061f271df57d0a14667fe6af3d523db6b Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 24 Jan 2024 12:18:32 +0100 Subject: Removal of download links due to maintenance burden --- MatrixRoomUtils.Web/Pages/About.razor | 24 ------------------------ MatrixRoomUtils.Web/Shared/MainLayout.razor | 28 ++-------------------------- scripts/deploy.sh | 10 ---------- 3 files changed, 2 insertions(+), 60 deletions(-) diff --git a/MatrixRoomUtils.Web/Pages/About.razor b/MatrixRoomUtils.Web/Pages/About.razor index 59368af..18d7c3f 100644 --- a/MatrixRoomUtils.Web/Pages/About.razor +++ b/MatrixRoomUtils.Web/Pages/About.razor @@ -1,7 +1,4 @@ @page "/About" -@using System.Net -@inject NavigationManager NavigationManager -@inject ILocalStorageService LocalStorage About @@ -13,24 +10,3 @@

You can find the source code on cgit.rory.gay.

You can also join the Matrix room for this project.

-@if (BinDownloadAvailable) { -

This deployment also serves a copy of the compiled, hosting-ready binaries at /MRU-BIN.tar.xz!

-} -@if (SrcDownloadAvailable) { -

This deployment also serves a copy of the source code at /MRU-SRC.tar.xz!

-} - -@code { - private bool BinDownloadAvailable { get; set; } - private bool SrcDownloadAvailable { get; set; } - - protected override async Task OnInitializedAsync() { - using var hc = new HttpClient(); - var hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri)); - BinDownloadAvailable = hr.StatusCode == HttpStatusCode.OK; - hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-SRC.tar.xz").AbsoluteUri)); - SrcDownloadAvailable = hr.StatusCode == HttpStatusCode.OK; - await base.OnInitializedAsync(); - } - -} diff --git a/MatrixRoomUtils.Web/Shared/MainLayout.razor b/MatrixRoomUtils.Web/Shared/MainLayout.razor index 74db805..2322af1 100644 --- a/MatrixRoomUtils.Web/Shared/MainLayout.razor +++ b/MatrixRoomUtils.Web/Shared/MainLayout.razor @@ -9,36 +9,12 @@
- Git + Git Matrix - @if (showDownload) { - Download - }
@Body
- - -@code { - private bool showDownload { get; set; } - - protected override async Task OnInitializedAsync() { - using var hc = new HttpClient(); - var hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri)); - showDownload = hr.StatusCode == HttpStatusCode.OK; - - // TODO: fix console logging toggle - // if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging) { - // Console.WriteLine("Console logging disabled!"); - // var sw = new StringWriter(); - // Console.SetOut(sw); - // Console.SetError(sw); - // } - - await base.OnInitializedAsync(); - } - -} \ No newline at end of file + \ No newline at end of file diff --git a/scripts/deploy.sh b/scripts/deploy.sh index df79ace..6755053 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -12,13 +12,3 @@ rm -rf **/bin/Release cd MatrixRoomUtils.Web dotnet publish -c Release rsync -raP bin/Release/net8.0/publish/wwwroot/ rory.gay:/data/nginx/html_mru/ -cd bin/Release/net8.0/publish/wwwroot -tar cf - ./ | xz -z -9 - > $BASE_DIR/MRU-BIN.tar.xz -#rsync -raP $BASE_DIR/MRU-BIN.tar.xz rory.gay:/data/nginx/html_mru/MRU-BIN.tar.xz -rm -rf $BASE_DIR/MRU-BIN.tar.xz -cd $BASE_DIR -git clone .git -b `git branch --show-current` src --recursive -rm -rf src/.git -tar cf - src/ | xz -z -9 - > MRU-SRC.tar.xz -rsync -raP $BASE_DIR/MRU-SRC.tar.xz rory.gay:/data/nginx/html_mru/MRU-SRC.tar.xz -rm -rf src/ -- cgit 1.4.1