From 2346cfef2299992a47016a23c74539788e04b718 Mon Sep 17 00:00:00 2001 From: Jared Date: Wed, 14 Apr 2021 06:03:31 -0700 Subject: [PATCH] Change --reverse-proxy, -r to --web-server, -w. --- README.md | 2 ++ Server.Installer/Program.cs | 5 ++++- .../PublishProfiles/Folder-Linux-x64.pubxml | 18 ++++++++++++++++++ .../PublishProfiles/Folder-Win-x64.pubxml | 19 +++++++++++++++++++ Server.Installer/Services/GitHubApi.cs | 9 +++++---- Server.Installer/Services/ServerInstaller.cs | 4 +++- 6 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 Server.Installer/Properties/PublishProfiles/Folder-Linux-x64.pubxml create mode 100644 Server.Installer/Properties/PublishProfiles/Folder-Win-x64.pubxml diff --git a/README.md b/README.md index ce6af258..a24285ab 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ I've created a cross-platform command line tool that will leverage the GitHub Ac ### Instructions for using the Remotely_Server_Installer CLI tool: - Fork the repo if you haven't already. +- Go to the Actions tab in your forked repo and make sure you can see the Build workflows. + - Before you can use Actions for the first time, there will be prompt that you must accept on this page. - If you've already forked the repo, you need to keep your repo updated with mine. This doesn't happen automatically. - This can be done via the command line if you've cloned your repo locally. Refer to [GitHub's docs](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) on how to do this. Otherwise, see below for how to do it completely through the GitHub website. - On the GitHub page for your repo, you'll see a message that says, "This branch is ## commits behind lucent-sea:master". diff --git a/Server.Installer/Program.cs b/Server.Installer/Program.cs index 4ea2c263..c8a95687 100644 --- a/Server.Installer/Program.cs +++ b/Server.Installer/Program.cs @@ -61,6 +61,9 @@ namespace Server.Installer ConsoleHelper.WriteLine("Be sure to retain your GitHub Personal Access Token if you want to re-use it " + "for upgrading in the future. The installer does not save it locally."); + ConsoleHelper.WriteLine("If you haven't already, please go to the Actions tab in your Remotely repo " + + "and enable them. If not, this process will fail."); + while (string.IsNullOrWhiteSpace(cliParams.GitHubUsername)) { @@ -107,7 +110,7 @@ namespace Server.Installer while (cliParams.WebServer is null) { - ConsoleHelper.WriteLine("Which reverse proxy will be used?"); + ConsoleHelper.WriteLine("Which web server will be used?"); ConsoleHelper.WriteLine(" [0] - Caddy on Ubuntu"); ConsoleHelper.WriteLine(" [1] - Nginx on Ubuntu"); ConsoleHelper.WriteLine(" [2] - Caddy on CentOS"); diff --git a/Server.Installer/Properties/PublishProfiles/Folder-Linux-x64.pubxml b/Server.Installer/Properties/PublishProfiles/Folder-Linux-x64.pubxml new file mode 100644 index 00000000..507ff4a5 --- /dev/null +++ b/Server.Installer/Properties/PublishProfiles/Folder-Linux-x64.pubxml @@ -0,0 +1,18 @@ + + + + + Release + x64 + publish\ + FileSystem + net5.0 + linux-x64 + true + True + False + true + + \ No newline at end of file diff --git a/Server.Installer/Properties/PublishProfiles/Folder-Win-x64.pubxml b/Server.Installer/Properties/PublishProfiles/Folder-Win-x64.pubxml new file mode 100644 index 00000000..e66c6b30 --- /dev/null +++ b/Server.Installer/Properties/PublishProfiles/Folder-Win-x64.pubxml @@ -0,0 +1,19 @@ + + + + + Release + x64 + publish\ + FileSystem + net5.0 + win-x64 + true + True + False + False + true + + \ No newline at end of file diff --git a/Server.Installer/Services/GitHubApi.cs b/Server.Installer/Services/GitHubApi.cs index ad891700..346729c0 100644 --- a/Server.Installer/Services/GitHubApi.cs +++ b/Server.Installer/Services/GitHubApi.cs @@ -15,15 +15,16 @@ namespace Server.Installer.Services { public interface IGitHubApi : IDisposable { - Task TriggerDispatch(CliParams cliParams); - Task GetLatestBuildArtifact(CliParams cliParams); Task DownloadArtifact(CliParams cliParams, string artifactDownloadUrl, string downloadToPath); + + Task GetLatestBuildArtifact(CliParams cliParams); + + Task TriggerDispatch(CliParams cliParams); } public class GitHubApi : IGitHubApi { - private readonly HttpClient _httpClient; private readonly string _apiHost = "https://api.github.com"; - + private readonly HttpClient _httpClient; public GitHubApi() { _httpClient = new HttpClient(); diff --git a/Server.Installer/Services/ServerInstaller.cs b/Server.Installer/Services/ServerInstaller.cs index 03346f6c..c569fc7b 100644 --- a/Server.Installer/Services/ServerInstaller.cs +++ b/Server.Installer/Services/ServerInstaller.cs @@ -38,7 +38,9 @@ namespace Server.Installer.Services if (!dispatchResult) { - ConsoleHelper.WriteError("GitHub API call to trigger build action failed. Please check your input parameters."); + ConsoleHelper.WriteError("GitHub API call to trigger build action failed. Do you have " + + "Actions enabled on your forked Remotely repo on the Actions tab? If not, enable them and try again. " + + "Otherwise, please check your input parameters."); return; }