-
Notifications
You must be signed in to change notification settings - Fork 749
WIP #13277
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
Closed
Closed
WIP #13277
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| // Aspire DevTools AppHost - Run developer scripts and tools via Aspire Dashboard | ||
| // To run this app in this repo use the following command line to ensure latest changes are always picked up: | ||
| // $ dotnet apphost.cs --no-cache | ||
|
|
||
| // These directives are not required in regular apps, only here in the aspire repo itself | ||
| /* | ||
| #:sdk Aspire.AppHost.Sdk | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this use LKG SDK package instead? |
||
| */ | ||
| #:property IsAspireHost=true | ||
| #:property PublishAot=false | ||
|
|
||
| var builder = DistributedApplication.CreateBuilder(args); | ||
|
|
||
| // Determine the shell to use based on platform | ||
| var isWindows = OperatingSystem.IsWindows(); | ||
| var shell = isWindows ? "pwsh" : "bash"; | ||
| var scriptExt = isWindows ? ".ps1" : ".sh"; | ||
|
|
||
| // ============================================================================= | ||
| // BUILD TOOLS | ||
| // ============================================================================= | ||
|
|
||
| builder.AddExecutable("restore", shell, ".", isWindows ? "./restore.cmd" : "./restore.sh") | ||
| .WithIconName("ArrowDownload") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.AddExecutable("build-debug", shell, ".", $"./eng/build{scriptExt}", "-restore", "-build", "-configuration", "Debug") | ||
| .WithIconName("Wrench") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.AddExecutable("build-release", shell, ".", $"./eng/build{scriptExt}", "-restore", "-build", "-configuration", "Release") | ||
| .WithIconName("Wrench") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.AddExecutable("build-pack", shell, ".", $"./eng/build{scriptExt}", "-restore", "-build", "-pack", "-configuration", "Release") | ||
| .WithIconName("BoxMultiple") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.AddExecutable("run-tests", shell, ".", $"./eng/build{scriptExt}", "-restore", "-build", "-test", "-configuration", "Debug") | ||
| .WithIconName("BeakerEdit") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.AddExecutable("build-extension", shell, "./extension", "./build.sh") | ||
| .WithIconName("ExtensionPuzzle") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // LOCAL CLI DEVELOPMENT | ||
| // ============================================================================= | ||
|
|
||
| // Create local hive with Debug packages | ||
| builder.AddExecutable("localhive-debug", shell, ".", $"./localhive{scriptExt}", "-c", "Debug", "-n", "dev") | ||
| .WithIconName("FolderAdd") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Create local hive with Release packages | ||
| builder.AddExecutable("localhive-release", shell, ".", $"./localhive{scriptExt}", "-c", "Release", "-n", "local") | ||
| .WithIconName("FolderAdd") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // CLI INSTALLATION | ||
| // ============================================================================= | ||
|
|
||
| // Get Aspire CLI (latest release) | ||
| builder.AddExecutable("get-cli-release", shell, "./eng/scripts", $"./get-aspire-cli{scriptExt}", "--quality", "release") | ||
| .WithIconName("ArrowDownload") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Get Aspire CLI (staging/preview) | ||
| builder.AddExecutable("get-cli-staging", shell, "./eng/scripts", $"./get-aspire-cli{scriptExt}", "--quality", "staging") | ||
| .WithIconName("ArrowDownload") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Get Aspire CLI (dev builds) | ||
| builder.AddExecutable("get-cli-dev", shell, "./eng/scripts", $"./get-aspire-cli{scriptExt}", "--quality", "dev") | ||
| .WithIconName("ArrowDownload") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // ANALYSIS & RELEASE NOTES TOOLS | ||
| // ============================================================================= | ||
|
|
||
| // Find missing NuGet packages for internal feeds | ||
| builder.AddExecutable("find-missing-packages", shell, "./eng", $"./find-missing-packages{scriptExt}") | ||
| .WithIconName("Search") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Extract API changes (builds and generates API diff) | ||
| builder.AddExecutable("extract-api-changes", shell, "./tools/ReleaseNotes", $"./extract-api-changes{scriptExt}") | ||
| .WithIconName("DocumentData") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Analyze all components for release notes | ||
| builder.AddExecutable("analyze-components", shell, "./tools/ReleaseNotes", $"./analyze-all-components{scriptExt}") | ||
| .WithIconName("DocumentBulletList") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // MANIFEST REFRESH | ||
| // ============================================================================= | ||
|
|
||
| // Refresh playground manifests (PowerShell script, works on both platforms) | ||
| builder.AddExecutable("refresh-manifests", "pwsh", ".", "./eng/refreshManifests.ps1") | ||
| .WithIconName("ArrowSync") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // GIT UTILITIES | ||
| // ============================================================================= | ||
|
|
||
| // Show git status | ||
| builder.AddExecutable("git-status", "git", ".", "status") | ||
| .WithIconName("BranchFork") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Show recent commits | ||
| builder.AddExecutable("git-log", "git", ".", "log", "--oneline", "-20") | ||
| .WithIconName("History") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Show current diff | ||
| builder.AddExecutable("git-diff", "git", ".", "diff") | ||
| .WithIconName("DocumentDiff") | ||
| .WithExplicitStart(); | ||
|
|
||
| // ============================================================================= | ||
| // QUICK UTILITIES | ||
| // ============================================================================= | ||
|
|
||
| // Clean build artifacts | ||
| builder.AddExecutable("clean", shell, ".", $"./eng/build{scriptExt}", "-clean") | ||
| .WithIconName("Delete") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Format code | ||
| builder.AddExecutable("format", "dotnet", ".", "format", "--verbosity", "normal") | ||
| .WithIconName("TextAlignLeft") | ||
| .WithExplicitStart(); | ||
|
|
||
| // Run dotnet with local SDK | ||
| builder.AddExecutable("dotnet-info", shell, ".", isWindows ? "./dotnet.cmd" : "./dotnet.sh", "--info") | ||
| .WithIconName("Info") | ||
| .WithExplicitStart(); | ||
|
|
||
| builder.Build().Run(); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and put a
#!instead so non-Windows can directly execute. Can disable the analyzer for this one file in an.editorconfig.