Release v0.1.2: embedded stdlib, docs, and extension branch policy.
Embed lib/*.mq.md in binary; marqdo version --check; public writeback/subtask pages; restore /vscode-extension/ ignore. VSIX built from branch vscode-extension only (see doc/design/vscode-extension-commit.md). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3da7b276d3
commit
2e65c055b8
23 files changed
+469
-53
No files matched your search
+29
-27
@@ -1,8 +1,8 @@
|
||||
# Build Windows release assets (exe, bundle zip with lib/, stdlib zip) and upload
|
||||
# Build Windows release assets (exe, bundle zip, stdlib zip, VSIX) and upload
|
||||
# to an existing GitHub Release tag.
|
||||
# Usage (from repo root):
|
||||
# powershell -File ./scripts/release-windows.ps1
|
||||
# powershell -File ./scripts/release-windows.ps1 -Tag v0.1.1
|
||||
# powershell -File ./scripts/release-windows.ps1 -Tag v0.1.2
|
||||
param(
|
||||
[string]$Tag = ""
|
||||
)
|
||||
@@ -27,22 +27,32 @@ cargo build --release -q
|
||||
$exeName = "marqdo-$ver-$target.exe"
|
||||
$zipName = "marqdo-$ver-$target.zip"
|
||||
$stdlibName = "marqdo-$ver-stdlib.zip"
|
||||
$vsixName = "marqdo-$ver.vsix"
|
||||
$exePath = Join-Path $dist $exeName
|
||||
$zipPath = Join-Path $dist $zipName
|
||||
$stdlibPath = Join-Path $dist $stdlibName
|
||||
$vsixPath = Join-Path $dist $vsixName
|
||||
|
||||
Copy-Item ".\target\release\marqdo.exe" $exePath -Force
|
||||
|
||||
# Bundle: marqdo.exe + lib/ (stdlib resolves next to the binary)
|
||||
Write-Host "Building VS Code extension $vsixName (from branch vscode-extension) ..."
|
||||
git fetch origin vscode-extension 2>$null
|
||||
git checkout origin/vscode-extension -- vscode-extension
|
||||
Push-Location vscode-extension
|
||||
npm ci --silent
|
||||
npm run compile
|
||||
npx @vscode/vsce package --no-dependencies -o $vsixPath
|
||||
Pop-Location
|
||||
|
||||
# Bundle: marqdo.exe + lib/ (optional disk override)
|
||||
if (Test-Path $stage) { Remove-Item $stage -Recurse -Force }
|
||||
New-Item -ItemType Directory -Force -Path $stage | Out-Null
|
||||
Copy-Item ".\target\release\marqdo.exe" (Join-Path $stage "marqdo.exe") -Force
|
||||
Copy-Item ".\lib" (Join-Path $stage "lib") -Recurse -Force
|
||||
Get-ChildItem -Path (Join-Path $stage "lib") -Recurse -Filter "*.mq.md" | Out-Null
|
||||
if (Test-Path $zipPath) { Remove-Item $zipPath -Force }
|
||||
Compress-Archive -Path (Join-Path $stage "*") -DestinationPath $zipPath -Force
|
||||
|
||||
# Stdlib-only zip (for users who already have the exe)
|
||||
# Stdlib-only zip (override / mirror)
|
||||
if (Test-Path $stageLib) { Remove-Item $stageLib -Recurse -Force }
|
||||
New-Item -ItemType Directory -Force -Path $stageLib | Out-Null
|
||||
Copy-Item ".\lib" (Join-Path $stageLib "lib") -Recurse -Force
|
||||
@@ -50,9 +60,10 @@ if (Test-Path $stdlibPath) { Remove-Item $stdlibPath -Force }
|
||||
Compress-Archive -Path (Join-Path $stageLib "*") -DestinationPath $stdlibPath -Force
|
||||
|
||||
Write-Host "Packaged:"
|
||||
Write-Host " $exePath (binary only — no stdlib)"
|
||||
Write-Host " $exePath (CLI with embedded stdlib)"
|
||||
Write-Host " $zipPath (marqdo.exe + lib/)"
|
||||
Write-Host " $stdlibPath (lib/ only)"
|
||||
Write-Host " $vsixPath (VS Code extension)"
|
||||
|
||||
$raw = ("protocol=https`nhost=github.com`n`n" | git credential fill 2>$null) -join "`n"
|
||||
$user = ([regex]::Match($raw, '(?m)^username=(.+)$')).Groups[1].Value
|
||||
@@ -68,7 +79,6 @@ $headers = @{
|
||||
$rel = Invoke-RestMethod -Uri "https://api.github.com/repos/cflmy/marqdo/releases/tags/$Tag" -Headers $headers
|
||||
Write-Host "Uploading to release $($rel.html_url)"
|
||||
|
||||
# Refresh release notes
|
||||
$notes = @"
|
||||
## Marqdo $Tag
|
||||
|
||||
@@ -76,34 +86,27 @@ $notes = @"
|
||||
|
||||
| Asset | Contents |
|
||||
|-------|----------|
|
||||
| ``$exeName`` | **Executable only** — does **not** include the standard library |
|
||||
| ``$zipName`` | **Recommended**: ``marqdo.exe`` + ``lib/`` (place them together; ``lib/`` is resolved next to the binary) |
|
||||
| ``$stdlibName`` | Standard library only (``lib/*.mq.md``) — unpack next to an existing ``marqdo.exe``, or set ``MARQDO_LIB`` |
|
||||
| ``marqdo-0.0.5.vsix`` | **VS Code / Cursor extension** — syntax highlight, Run / View / Debug toolbar, CLI+stdlib install helper. Install via ``Extensions: Install from VSIX…``. Source: branch ``vscode-extension``. |
|
||||
|
||||
> **Important:** the standalone ``.exe`` does **not** ship ``lib/``. Importing ``lib/text.mq.md`` etc. needs the bundle zip or the stdlib zip beside the binary (or ``MARQDO_LIB``).
|
||||
| ``$exeName`` | CLI with **embedded** official stdlib (``lib/*.mq.md``) |
|
||||
| ``$zipName`` | ``marqdo.exe`` + ``lib/`` (optional disk override) |
|
||||
| ``$stdlibName`` | Standard library only — unpack to override embedded lib |
|
||||
| ``$vsixName`` | **VS Code / Cursor extension** — built from branch ``vscode-extension`` only (see doc/design/vscode-extension-commit.md) |
|
||||
|
||||
### Highlights
|
||||
- Code as docs as knowledge: ``.mq.md`` is narrative + program
|
||||
- ``marqdo debug``: breakpoints / step / locals; page favicon and brand use the official Logo
|
||||
- ``marqdo view``: docs-only Structure + outline/search + Execution
|
||||
- VS Code extension v0.0.5: three editor actions (Run / View / Debug), logo cover icon, startup CLI version & stdlib detection with optional install
|
||||
- ``marqdo catalog`` / ``sync``: OKF-style YAML + module pages
|
||||
- Roadmap: deeper OKF-aligned catalog for human–AI knowledge bases
|
||||
- **Embedded stdlib**: standalone ``.exe`` imports ``lib/…`` without a separate zip
|
||||
- **writeback** + **subtask** (file / function / foreign concurrency)
|
||||
- **v0.2 syntax**: ``+`param` ``, ``1.`` branches, backtick identifiers, quoted strings
|
||||
- ``marqdo version --check`` compares with GitHub latest release
|
||||
|
||||
### Quick start
|
||||
|
||||
``````text
|
||||
marqdo --version
|
||||
marqdo version --check
|
||||
marqdo run public/00-welcome.mq.md
|
||||
marqdo view public
|
||||
marqdo debug public
|
||||
marqdo catalog public -o .marqdo
|
||||
``````
|
||||
|
||||
### Requirements
|
||||
- Windows x64 for the prebuilt ``.exe`` / zip assets above
|
||||
- Extension needs Marqdo CLI ≥ 0.1.0 (this release is 0.1.1); auto-install downloads the GitHub bundle when missing
|
||||
See [CHANGELOG.md](https://github.com/cflmy/marqdo/blob/main/CHANGELOG.md).
|
||||
"@
|
||||
|
||||
$body = @{
|
||||
@@ -115,10 +118,9 @@ $body = @{
|
||||
} | ConvertTo-Json -Depth 5
|
||||
Invoke-RestMethod -Method Patch -Uri "https://api.github.com/repos/cflmy/marqdo/releases/$($rel.id)" -Headers $headers -ContentType "application/json; charset=utf-8" -Body ([Text.Encoding]::UTF8.GetBytes($body)) | Out-Null
|
||||
|
||||
# Re-fetch assets list after patch
|
||||
$rel = Invoke-RestMethod -Uri "https://api.github.com/repos/cflmy/marqdo/releases/$($rel.id)" -Headers $headers
|
||||
|
||||
foreach ($file in @($exeName, $zipName, $stdlibName)) {
|
||||
foreach ($file in @($exeName, $zipName, $stdlibName, $vsixName)) {
|
||||
$path = Join-Path $dist $file
|
||||
$existing = $rel.assets | Where-Object { $_.name -eq $file }
|
||||
if ($existing) {
|
||||
@@ -127,7 +129,7 @@ foreach ($file in @($exeName, $zipName, $stdlibName)) {
|
||||
}
|
||||
$uri = "https://uploads.github.com/repos/cflmy/marqdo/releases/$($rel.id)/assets?name=$([uri]::EscapeDataString($file))"
|
||||
$bytes = [System.IO.File]::ReadAllBytes($path)
|
||||
$ctype = if ($file.EndsWith(".zip")) { "application/zip" } else { "application/octet-stream" }
|
||||
$ctype = if ($file.EndsWith(".zip")) { "application/zip" } elseif ($file.EndsWith(".vsix")) { "application/vsix" } else { "application/octet-stream" }
|
||||
$asset = Invoke-RestMethod -Method Post -Uri $uri -Headers $headers -ContentType $ctype -Body $bytes
|
||||
Write-Host " $($asset.browser_download_url)"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user