feat: 🐬 update publish linux sh

This commit is contained in:
anjoy8 2023-02-26 18:32:49 +08:00
parent 6ad74a5385
commit 77f16b55e1
5 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,3 @@
git pull
@echo off @echo off

View File

@ -15,7 +15,9 @@ namespace Blog.Core.AdminMvc
Host.CreateDefaultBuilder(args) Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostingContext, config) => .ConfigureAppConfiguration((hostingContext, config) =>
{ {
config.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true) config.AddJsonFile("appsettings.gw.json", optional: true, reloadOnChange: false)
.AddJsonFile($"appsettings.gw.{hostingContext.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: false)
.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true)
.AddJsonFile($"ocelot.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true); .AddJsonFile($"ocelot.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true);
}) })
.ConfigureWebHostDefaults(webBuilder => .ConfigureWebHostDefaults(webBuilder =>

View File

@ -1,8 +1,9 @@
git pull;
find .PublishFiles/ -type f -and ! -path '*/wwwroot/images/*' ! -name 'appsettings.*' |xargs rm -rf find .PublishFiles/ -type f -and ! -path '*/wwwroot/images/*' ! -name 'appsettings.*' |xargs rm -rf
dotnet build; dotnet build;
rm -rf /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles; rm -rf /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles;
dotnet publish -o /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles; dotnet publish -o /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles;
rm -rf /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles/WMBlog.db;
# cp -r /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles ./; # cp -r /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles ./;
awk 'BEGIN { cmd="cp -ri /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles ./"; print "n" |cmd; }' awk 'BEGIN { cmd="cp -ri /home/Blog.Core/Blog.Core.Api/bin/Debug/.PublishFiles ./"; print "n" |cmd; }'
echo "Successfully!!!! ^ please see the file .PublishFiles"; echo "Successfully!!!! ^ please see the file .PublishFiles";