diff --git a/README.md b/README.md index c7687ed8..cea77427 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [发行版](https://gitee.com/sourcegit/SourceGit/releases/) 1. `SourceGit.exe`为不包含`.NET 5.0`运行时的可执行文件。如果本机已有`.NET 5.0`可下载使用 -2. `SourceGit.tar.gz`为`self-contained`包。包含了`.NET 5.0`运行时。 +2. `SourceGit.zip`为`self-contained`包。包含了`.NET 5.0`运行时。 ## 预览 diff --git a/build.bat b/build.bat deleted file mode 100644 index 0b2348bf..00000000 --- a/build.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off - -cd src - -dotnet publish -c Release -r win-x64 -o ..\publish\SourceGit\ -p:PublishSingleFile=true --self-contained=true -dotnet publish -c Release -r win-x64 -o ..\publish\ -p:PublishSingleFile=true --self-contained=false - -tar -C ..\publish -czvf ..\publish\SourceGit.tar.gz SourceGit\*.* -rmdir /S /Q ..\publish\SourceGit - -pause \ No newline at end of file diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 00000000..211c81b8 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,7 @@ +cd src + +dotnet publish -c Release -r win-x64 -o ..\publish\ -p:PublishSingleFile=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained=true +Compress-Archive -Path ..\publish\SourceGit.exe -DestinationPath ..\publish\SourceGit.zip +del /f /s /q ..\publish\SourceGit.exe + +dotnet publish -c Release -r win-x64 -o ..\publish\ -p:PublishSingleFile=true --self-contained=false \ No newline at end of file diff --git a/src/SourceGit.csproj b/src/SourceGit.csproj index 04091b0d..74ec0e1d 100644 --- a/src/SourceGit.csproj +++ b/src/SourceGit.csproj @@ -16,8 +16,15 @@ Public true + none false + + + + + + \ No newline at end of file