Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release build generator script #70

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Linux Debugger
# Build script for generating release package

if (Test-Path -Path "bin")
{
Remove-Item bin\* -Recurse -Force
}

$VCToolsInstallDir = . "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath
Write-Host "VCToolsInstallDir: $VCToolsInstallDir"

$msBuildPath = "$VCToolsInstallDir\MSBuild\Current\Bin\msbuild.exe"
Write-Host "msBuildPath: $msBuildPath"

Write-Host "Cleaning..."
& $msBuildPath -t:Clean src/LinuxDebugger.sln

Write-Host "Building..."
& $msBuildPath /restore `
src/LinuxDebugger.sln `
/p:Configuration=Release

# TODO:
### https://github.com/madskristensen/VsctIntellisense/blob/master/appveyor.yml
# (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
# Vsix-IncrementVsixVersion .\src\VsctCompletion2019\source.extension.vsixmanifest | Vsix-UpdateBuildVersion
# Vsix-IncrementVsixVersion .\src\VsctCompletion2022\source.extension.vsixmanifest
# Vsix-TokenReplacement src\VsctCompletion2019\source.extension.cs 'Version = "([0-9\\.]+)"' 'Version = "{version}"'
# Vsix-TokenReplacement src\VsctCompletion2022\source.extension.cs 'Version = "([0-9\\.]+)"' 'Version = "{version}"'
# nuget restore -Verbosity quiet
# msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m

## TODO: Build project and set version to 1.2.3.4
# dotnet build -p:Version=1.2.3.4