mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
update<Build>: using Power-Shell instead of cmd to run build script
This commit is contained in:
parent
61fe751f13
commit
81d82630ba
4 changed files with 15 additions and 12 deletions
|
@ -7,7 +7,7 @@
|
||||||
[发行版](https://gitee.com/sourcegit/SourceGit/releases/)
|
[发行版](https://gitee.com/sourcegit/SourceGit/releases/)
|
||||||
|
|
||||||
1. `SourceGit.exe`为不包含`.NET 5.0`运行时的可执行文件。如果本机已有`.NET 5.0`可下载使用
|
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`运行时。
|
||||||
|
|
||||||
## 预览
|
## 预览
|
||||||
|
|
||||||
|
|
11
build.bat
11
build.bat
|
@ -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
|
|
7
build.ps1
Normal file
7
build.ps1
Normal file
|
@ -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
|
|
@ -16,8 +16,15 @@
|
||||||
<RepositoryType>Public</RepositoryType>
|
<RepositoryType>Public</RepositoryType>
|
||||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<DebugSymbols>false</DebugSymbols>
|
<DebugSymbols>false</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<TrimmerRootAssembly Include="System.Runtime" />
|
||||||
|
<TrimmerRootAssembly Include="System.Diagnostics.Debug" />
|
||||||
|
<TrimmerRootAssembly Include="System.Runtime.Extensions" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in a new issue