mirror of
https://github.com/Rohithgilla12/data-peek
synced 2026-04-21 21:07:17 +00:00
* plan: add install.cat support AGENT_PLAN_ANCHOR ## Original User Request (verbatim) Vamos resolver a issue https://github.com/Rohithgilla12/data-peek/issues/108 para isso faça em clone do projeto em uma pasta temporária, crie os devidos arquivos install.sh e install.ps1 e atualize o README.md sempre seguindo as recomendações de https://install.cat ao final faça um PR para o repositório original. Antes do PR me mostre a mensagem para aprovação. Quando tudo concluir, apagar pasta local. Provavelmente teremos que fazer um fork para PR. O cli gh está disponível e autenticado. Pergunte aos planners também, exceto o planClaude que está falhando. implement ## Objective Add install.cat-compatible root installer scripts and README guidance, prepare and create an upstream PR after user approval of the PR message, then remove the temporary local clone. ## Execution Plan - [ ] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [ ] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [ ] Step 3: Validate the new scripts and docs in this environment. - [ ] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Do - Keep install.sh compatible with sh for install.cat piping. - Use release asset pattern matching instead of hardcoded versioned URLs. - Automate the macOS xattr cleanup noted in the README. - Pause before gh pr create to show the exact PR title and body for approval. ## Do Not - Create the PR before user approval of the PR message. - Delete the temporary clone before the PR is created. - Change unrelated application code or release workflows. ## References - https://github.com/Rohithgilla12/data-peek/issues/108 - https://install.cat - README.md - apps/desktop/electron-builder.yml - .github/workflows/build.yml - .github/PULL_REQUEST_TEMPLATE.md ## Risks and Dependencies - Release asset names may drift and must be matched dynamically. - macOS and Windows install flows cannot be fully executed from this Linux environment. - Pushing the branch depends on gh authentication and fork availability. * chore(agent): [Step 1/5] add install scripts PLAN_REF: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf PREVIOUS_STEP: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf — plan initialized ## Completed in This Step - Added a POSIX-compatible root install.sh for install.cat on macOS and Linux - Added a root install.ps1 that downloads and runs the latest Windows installer - Used live GitHub release asset pattern matching instead of hardcoded versions ## References Used - https://install.cat - apps/desktop/electron-builder.yml - .github/workflows/build.yml - homebrew/Casks/data-peek.rb ## Debts and Warnings - Windows runtime could not be executed from this Linux environment - macOS DMG flow was validated statically but not run end-to-end here ## Progress (ref: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf) - [x] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [ ] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [ ] Step 3: Validate the new scripts and docs in this environment. - [ ] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Next Step chore(agent): [Step 2/5] update README install flow * chore(agent): [Step 2/5] update README install flow PLAN_REF: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf PREVIOUS_STEP: 492f01106bf3a336b7871d207bf8ad7d019d4967 — added install.cat installer scripts ## Completed in This Step - Reworked the installation section to make install.cat the primary path - Kept Homebrew and manual download options as secondary install methods - Updated the macOS xattr guidance to match the installed app bundle name ## References Used - README.md - https://install.cat - .github/PULL_REQUEST_TEMPLATE.md ## Debts and Warnings - README install instructions for Windows were updated based on static script review only ## Progress (ref: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf) - [x] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [x] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [x] Step 3: Validate the new scripts and docs in this environment. - [ ] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Next Step chore(agent): [Step 4/5] push fork branch and draft PR message * fix: allow sudo prompts from install.cat shell pipe PLAN_REF: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf ## Completed in This Step - Routed sudo calls through /dev/tty so the macOS installer can prompt when install.sh is piped into sh - Kept the install.cat shell flow unchanged while avoiding stdin conflicts from curl piping ## References Used - Reviewer report for492f011735- https://install.cat ## Debts and Warnings - macOS and Windows runtime flows are still statically validated in this Linux environment ## Progress (ref: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf) - [x] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [x] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [x] Step 3: Validate the new scripts and docs in this environment. - [x] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Next Step chore(agent): [Step 5/5] create PR after approval and clean temp clone * fix: address PR review follow-ups PLAN_REF: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf ## Completed in This Step - Hardened release downloads with retries and explicit https README commands - Improved installer portability and robustness across PowerShell and macOS app discovery - Scoped asset URL extraction to browser_download_url fields and checked interactive installer exit codes ## References Used - PR #116 review comments - https://install.cat - https://cli.github.com/manual/gh_pr_review ## Debts and Warnings - Checksum verification remains deferred because the installer flow still needs a dependency-light manifest strategy - pwsh is still unavailable in this Linux environment, so PowerShell execution remains statically validated ## Progress (ref: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf) - [x] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [x] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [x] Step 3: Validate the new scripts and docs in this environment. - [x] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Next Step fix: reply to remaining PR review threads and keep the branch updated * fix: restore installer portability PLAN_REF: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf ## Completed in This Step - Removed curl retry flags that are unavailable on older distributions - Relaxed browser_download_url parsing to tolerate whitespace in GitHub API responses ## References Used - Reviewer report for1391a61ddd## Debts and Warnings - Checksum verification remains deferred for a future dependency-light implementation ## Progress (ref: e082f4f7cbafc0d8e50d4e79ff1b37629b8fcccf) - [x] Step 1: Add root install.sh and install.ps1 with dynamic release asset selection and platform-specific installation flows. - [x] Step 2: Update README.md to make install.cat the primary install path while preserving manual alternatives. - [x] Step 3: Validate the new scripts and docs in this environment. - [x] Step 4: Commit the implementation, push a fork branch, and draft the PR message for approval. - [ ] Step 5: Create the upstream PR after approval and delete the temporary clone. ## Next Step fix: update PR threads after follow-up review
46 lines
1.5 KiB
PowerShell
46 lines
1.5 KiB
PowerShell
[CmdletBinding()]
|
|
param()
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$ProgressPreference = 'SilentlyContinue'
|
|
|
|
$repoSlug = 'Rohithgilla12/data-peek'
|
|
$apiUrl = "https://api.github.com/repos/$repoSlug/releases/latest"
|
|
$headers = @{
|
|
Accept = 'application/vnd.github+json'
|
|
'User-Agent' = 'data-peek-install-script'
|
|
}
|
|
|
|
Write-Host 'Fetching latest data-peek release metadata...'
|
|
$release = Invoke-RestMethod -Uri $apiUrl -Headers $headers
|
|
$asset = $release.assets | Where-Object { $_.name -like '*-setup.exe' } | Select-Object -First 1
|
|
|
|
if (-not $asset) {
|
|
throw 'Could not find a Windows setup.exe asset in the latest release.'
|
|
}
|
|
|
|
$tempDir = if ($env:TEMP) { $env:TEMP } else { [IO.Path]::GetTempPath() }
|
|
$tempInstaller = Join-Path $tempDir $asset.name
|
|
|
|
try {
|
|
Write-Host 'Downloading Windows installer...'
|
|
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $tempInstaller
|
|
|
|
Write-Host 'Running installer silently...'
|
|
$process = Start-Process -FilePath $tempInstaller -ArgumentList '/S' -PassThru -Wait
|
|
|
|
if ($process.ExitCode -ne 0) {
|
|
Write-Warning "Silent install exited with code $($process.ExitCode). Falling back to interactive installer."
|
|
$interactive = Start-Process -FilePath $tempInstaller -PassThru -Wait
|
|
if ($interactive.ExitCode -ne 0) {
|
|
throw "Interactive install failed with exit code $($interactive.ExitCode)."
|
|
}
|
|
}
|
|
|
|
Write-Host 'data-peek installation completed.'
|
|
}
|
|
finally {
|
|
if (Test-Path $tempInstaller) {
|
|
Remove-Item $tempInstaller -Force -ErrorAction SilentlyContinue
|
|
}
|
|
}
|