Change --reverse-proxy, -r to --web-server, -w.

This commit is contained in:
Jared 2021-04-14 06:03:31 -07:00 committed by Jared Goodwin
parent 997a2e8ba7
commit 2346cfef22
6 changed files with 51 additions and 6 deletions

View File

@ -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".

View File

@ -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");

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>False</PublishTrimmed>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>False</PublishTrimmed>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>
</Project>

View File

@ -15,15 +15,16 @@ namespace Server.Installer.Services
{
public interface IGitHubApi : IDisposable
{
Task<bool> TriggerDispatch(CliParams cliParams);
Task<Artifact> GetLatestBuildArtifact(CliParams cliParams);
Task<bool> DownloadArtifact(CliParams cliParams, string artifactDownloadUrl, string downloadToPath);
Task<Artifact> GetLatestBuildArtifact(CliParams cliParams);
Task<bool> 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();

View File

@ -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;
}