-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
33 lines (25 loc) · 951 Bytes
/
build.ps1
File metadata and controls
33 lines (25 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Build and run the Asaas SDK examples
Write-Host "Building Asaas SDK..." -ForegroundColor Cyan
# Restore dependencies
dotnet restore
if ($LASTEXITCODE -ne 0) {
Write-Host "Failed to restore dependencies" -ForegroundColor Red
exit 1
}
# Build the solution
dotnet build --configuration Release
if ($LASTEXITCODE -ne 0) {
Write-Host "Build failed" -ForegroundColor Red
exit 1
}
Write-Host "Build successful!" -ForegroundColor Green
Write-Host ""
# Ask if user wants to run the example
$response = Read-Host "Do you want to run the example application? (Y/N)"
if ($response -eq 'Y' -or $response -eq 'y') {
Write-Host ""
Write-Host "Running example application..." -ForegroundColor Cyan
Write-Host "Note: Make sure to set your ASAAS_API_KEY environment variable or edit the Program.cs file" -ForegroundColor Yellow
Write-Host ""
dotnet run --project examples\Asaas.Sdk.Examples\Asaas.Sdk.Examples.csproj
}