Merge branch 'develop' of https://github.com/Kareadita/Kavita into develop
This commit is contained in:
commit
d8a9a95fc9
3 changed files with 5 additions and 10 deletions
|
|
@ -16,7 +16,6 @@ namespace API.Extensions
|
||||||
{
|
{
|
||||||
services.AddHttpClient<StatsApiClient>(client =>
|
services.AddHttpClient<StatsApiClient>(client =>
|
||||||
{
|
{
|
||||||
client.BaseAddress = new Uri("https://stats.kavitareader.com");
|
|
||||||
client.DefaultRequestHeaders.Add("api-key", "MsnvA2DfQqxSK5jh");
|
client.DefaultRequestHeaders.Add("api-key", "MsnvA2DfQqxSK5jh");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using API.Configurations.CustomOptions;
|
using API.Configurations.CustomOptions;
|
||||||
|
|
@ -15,6 +16,7 @@ namespace API.Services.Clients
|
||||||
private readonly HttpClient _client;
|
private readonly HttpClient _client;
|
||||||
private readonly StatsOptions _options;
|
private readonly StatsOptions _options;
|
||||||
private readonly ILogger<StatsApiClient> _logger;
|
private readonly ILogger<StatsApiClient> _logger;
|
||||||
|
private const string ApiUrl = "http://stats.kavitareader.com";
|
||||||
|
|
||||||
public StatsApiClient(HttpClient client, IOptions<StatsOptions> options, ILogger<StatsApiClient> logger)
|
public StatsApiClient(HttpClient client, IOptions<StatsOptions> options, ILogger<StatsApiClient> logger)
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +31,7 @@ namespace API.Services.Clients
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var response = await _client.PostAsJsonAsync("/api/InstallationStats", data);
|
using var response = await _client.PostAsJsonAsync(ApiUrl + "/api/InstallationStats", data);
|
||||||
|
|
||||||
responseContent = await response.Content.ReadAsStringAsync();
|
responseContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,6 @@ Package()
|
||||||
local runtime="$2"
|
local runtime="$2"
|
||||||
local lOutputFolder=../_output/"$runtime"/Kavita
|
local lOutputFolder=../_output/"$runtime"/Kavita
|
||||||
|
|
||||||
echo "Integrity check on root folder"
|
|
||||||
ls -l
|
|
||||||
|
|
||||||
ProgressStart "Creating $runtime Package for $framework"
|
ProgressStart "Creating $runtime Package for $framework"
|
||||||
|
|
||||||
# TODO: Use no-restore? Because Build should have already done it for us
|
# TODO: Use no-restore? Because Build should have already done it for us
|
||||||
|
|
@ -45,14 +42,11 @@ Package()
|
||||||
echo dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
echo dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
||||||
dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
||||||
|
|
||||||
echo "Integrity check on API wwwroot folder"
|
|
||||||
ls -l "$lOutputFolder"/wwwroot
|
|
||||||
|
|
||||||
echo "Renaming API -> Kavita"
|
echo "Renaming API -> Kavita"
|
||||||
mv "$lOutputFolder"/API "$lOutputFolder"/Kavita
|
mv "$lOutputFolder"/API "$lOutputFolder"/Kavita
|
||||||
|
|
||||||
echo "Integrity check on Kavita wwwroot folder"
|
echo "Copying webui wwwroot to build"
|
||||||
ls -l "$lOutputFolder"/wwwroot
|
cp -r wwwroot/* "$lOutputFolder"/wwwroot/
|
||||||
|
|
||||||
echo "Copying Install information"
|
echo "Copying Install information"
|
||||||
cp ../INSTALL.txt "$lOutputFolder"/README.txt
|
cp ../INSTALL.txt "$lOutputFolder"/README.txt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue