Skip to content

Commit 125d2e4

Browse files
committed
Added publish script
A few tweaks Changed version
1 parent f3b37ba commit 125d2e4

File tree

18 files changed

+116
-18
lines changed

18 files changed

+116
-18
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.vs/
1+
.vs/
2+
3+
*.user

Directory.Build.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Version>0.0.1</Version>
4+
<Authors>Bitcoder</Authors>
5+
<RepositoryUrl>https://github.com/BitcoderCZ/FanScript</RepositoryUrl>
6+
</PropertyGroup>
7+
<PropertyGroup>
8+
<TrimMode>partial</TrimMode>
9+
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
10+
</PropertyGroup>
11+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
12+
<DebugSymbols>False</DebugSymbols>
13+
<DebugType>None</DebugType>
14+
</PropertyGroup>
15+
</Project>
File renamed without changes.
File renamed without changes.

FanScript.Cli/FanScript.Cli.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<PublishSingleFile>true</PublishSingleFile>
9+
<PublishReadyToRun>true</PublishReadyToRun>
10+
<PublishTrimmed>false</PublishTrimmed>
811
</PropertyGroup>
912

1013
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -17,7 +20,6 @@
1720

1821
<ItemGroup>
1922
<PackageReference Include="CommandLineParser" Version="2.9.1" />
20-
<PackageReference Include="Melanchall.DryWetMidi" Version="7.2.0" />
2123
</ItemGroup>
2224

2325
<ItemGroup>
@@ -26,10 +28,10 @@
2628

2729
<ItemGroup>
2830
<Reference Include="FancadeLoaderLib">
29-
<HintPath>..\FancadeLoaderLib.dll</HintPath>
31+
<HintPath>..\Dlls\FancadeLoaderLib.dll</HintPath>
3032
</Reference>
3133
<Reference Include="MathUtils">
32-
<HintPath>..\MathUtils.dll</HintPath>
34+
<HintPath>..\Dlls\MathUtils.dll</HintPath>
3335
</Reference>
3436
</ItemGroup>
3537

FanScript.Cli/publish.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Param (
2+
[Parameter(Mandatory)]
3+
[string]$version
4+
)
5+
6+
$profiles = 'win-x64', 'win-arm64', 'linux-x64', 'linux-arm64'
7+
$publishDir = './bin/Publish'
8+
9+
foreach ($profile in $profiles) {
10+
Write-Host "Publishing $profile"
11+
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
12+
}
13+
14+
Write-Host "Published $($profiles.Count) profile(s)"
15+
16+
New-Item -Path $publishDir -Name "Compressed" -ItemType "directory" -Force
17+
18+
$currentDir = Split-Path -Path (Get-Location) -Leaf
19+
20+
foreach ($profile in $profiles) {
21+
$fromDir = "$publishDir/$profile/*"
22+
$toFile = "$publishDir/Compressed/$($currentDir)_$($profile)_$version.zip"
23+
Write-Host "Comressing $fromDir to $toFile"
24+
25+
Compress-Archive -Path $fromDir -CompressionLevel 'Optimal' -DestinationPath $toFile -Force
26+
}
27+
28+
Write-Host "Compressed builds into archives"
29+
Write-Host "Done"

FanScript.LangServer/FanScript.LangServer.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>disable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<PublishSingleFile>true</PublishSingleFile>
9+
<PublishReadyToRun>true</PublishReadyToRun>
10+
<PublishTrimmed>false</PublishTrimmed>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<Version>0.0.1</Version>
815
</PropertyGroup>
916

1017
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

FanScript.LangServer/publish.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Param (
2+
[Parameter(Mandatory)]
3+
[string]$version
4+
)
5+
6+
$profiles = 'win-x64', 'win-arm64', 'linux-x64', 'linux-arm64'
7+
$publishDir = './bin/Publish'
8+
9+
foreach ($profile in $profiles) {
10+
Write-Host "Publishing $profile"
11+
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
12+
}
13+
14+
Write-Host "Published $($profiles.Count) profile(s)"
15+
16+
New-Item -Path $publishDir -Name "Compressed" -ItemType "directory" -Force
17+
18+
$currentDir = Split-Path -Path (Get-Location) -Leaf
19+
20+
foreach ($profile in $profiles) {
21+
$fromDir = "$publishDir/$profile/*"
22+
$toFile = "$publishDir/Compressed/$($currentDir)_$($profile)_$version.zip"
23+
Write-Host "Comressing $fromDir to $toFile"
24+
25+
Compress-Archive -Path $fromDir -CompressionLevel 'Optimal' -DestinationPath $toFile -Force
26+
}
27+
28+
Write-Host "Compressed builds into archives"
29+
Write-Host "Done"

0 commit comments

Comments
 (0)