-
Notifications
You must be signed in to change notification settings - Fork 321
Enrich the CLI experience with usecases to quickly try out ThunderID #3279
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -530,6 +530,105 @@ function Lint-SDKs { | |
| Write-Host "================================================================" | ||
| } | ||
|
|
||
| function Build-CLI { | ||
| Write-Host "Building CLI tool..." | ||
| & bash "$PSScriptRoot/tools/cli/scripts/build.sh" | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } | ||
|
|
||
| function Test-CLI { | ||
| Write-Host "Running CLI tool tests..." | ||
| Push-Location "$PSScriptRoot/tools/cli" | ||
| try { | ||
| & go test -v -race -count=1 ./... | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } finally { | ||
| Pop-Location | ||
| } | ||
| } | ||
|
|
||
| function Build-I18n-Extractor { | ||
| $toolBin = Join-Path $PSScriptRoot "backend/bin/tools" | ||
| New-Item -ItemType Directory -Force -Path $toolBin | Out-Null | ||
| Write-Host "Building i18n-extractor..." | ||
| Push-Location "$PSScriptRoot/tools/i18n-extractor" | ||
| try { | ||
| & go build -o "$toolBin/i18n-extractor.exe" . | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } finally { | ||
| Pop-Location | ||
| } | ||
| } | ||
|
Comment on lines
+550
to
+561
Contributor
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. Platform-conditional binary extensions needed in
🧰 Tools🪛 PSScriptAnalyzer (1.25.0)[warning] Missing BOM encoding for non-ASCII encoded file 'build.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI Agents |
||
|
|
||
| function Test-I18n-Extractor { | ||
| Write-Host "Running i18n-extractor tests..." | ||
| Push-Location "$PSScriptRoot/tools/i18n-extractor" | ||
| try { | ||
| & go test -v . | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } finally { | ||
| Pop-Location | ||
| } | ||
| } | ||
|
|
||
| function Lint-CLI { | ||
| $golangciLint = Join-Path $PSScriptRoot "backend/bin/tools/golangci-lint.exe" | ||
| Write-Host "Linting CLI tool..." | ||
| Push-Location "$PSScriptRoot/tools/cli" | ||
| try { | ||
| & $golangciLint run ./... | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } finally { | ||
| Pop-Location | ||
| } | ||
| } | ||
|
|
||
| function Lint-I18n-Extractor { | ||
| $golangciLint = Join-Path $PSScriptRoot "backend/bin/tools/golangci-lint.exe" | ||
| Write-Host "Linting i18n-extractor..." | ||
| Push-Location "$PSScriptRoot/tools/i18n-extractor" | ||
| try { | ||
| & $golangciLint run ./... | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } finally { | ||
| Pop-Location | ||
| } | ||
| } | ||
|
|
||
| function Lint-Tools { | ||
| Write-Host "================================================================" | ||
| Write-Host "Linting tools..." | ||
| Lint-CLI | ||
| Lint-I18n-Extractor | ||
| Write-Host "================================================================" | ||
| } | ||
|
|
||
| function Build-Npm-Tools { | ||
| Ensure-Pnpm | ||
| Write-Host "Installing tools dependencies..." | ||
| & pnpm install --frozen-lockfile | ||
| Write-Host "Building npm-based tools..." | ||
| & pnpm --filter './tools/**' build | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } | ||
|
|
||
| function Build-Tools { | ||
| Write-Host "================================================================" | ||
| Write-Host "Building tools..." | ||
| Build-CLI | ||
| Build-I18n-Extractor | ||
| Build-Npm-Tools | ||
| Write-Host "================================================================" | ||
| } | ||
|
|
||
| function Test-Tools { | ||
| Write-Host "================================================================" | ||
| Write-Host "Running tool tests..." | ||
| Test-CLI | ||
| Test-I18n-Extractor | ||
| Write-Host "================================================================" | ||
| } | ||
|
|
||
| function Initialize-Databases { | ||
| param( | ||
| [bool]$override = $false | ||
|
|
@@ -1793,6 +1892,15 @@ switch ($Command) { | |
| 'lint_sdks' { | ||
| Lint-SDKs | ||
| } | ||
| 'build_tools' { | ||
| Build-Tools | ||
| } | ||
| 'test_tools' { | ||
| Test-Tools | ||
| } | ||
| 'lint_tools' { | ||
| Lint-Tools | ||
| } | ||
| 'package_samples' { | ||
| Package-Sample-App | ||
| } | ||
|
|
@@ -1822,7 +1930,7 @@ switch ($Command) { | |
| Test-Integration | ||
| } | ||
| default { | ||
| Write-Host "Usage: $($MyInvocation.MyCommand.Name) {clean|build|build_backend|build_frontend|build_docs|package_samples|test_unit|test_integration|merge_coverage|run|run_backend|run_frontend|run_docs|test}" | ||
| Write-Host "Usage: $($MyInvocation.MyCommand.Name) {clean|build|build_backend|build_frontend|build_docs|build_sdks|test_sdks|lint_sdks|build_tools|test_tools|lint_tools|package_samples|test_unit|test_integration|merge_coverage|run|run_backend|run_frontend|run_docs|test}" | ||
| exit 1 | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.