Commit Graph

6 Commits

Author SHA1 Message Date
wbtiger 78f435a57c fix: force binary re-download on version mismatch in postinstall
The postinstall script was only checking if the existing binary could
run (--help), not whether its version matched the npm package version.
This caused npm upgrades to skip downloading the new binary, leaving
users on stale versions without fixes.

Now checks `gitlink-cli version` output against package.json version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 09:56:55 +08:00
wbtiger df8937316a fix: improve release asset matching with version fallback
- When exact version release not found, fallback to latest release
- Match assets by platform/arch pattern when version in filename differs
- Ensures npm install works even when release version != npm version

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:39:45 +08:00
wbtiger c3744936d9 fix: prepend domain to relative download URL in install.js
GitLink release API returns relative URLs for attachments (e.g.
/Gitlink/gitlink-cli/releases/download/...). Prepend RELEASE_BASE
to make them absolute, fixing "Invalid URL" error on Windows/Linux.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:08:01 +08:00
wbtiger d32f3b53c9 fix: npm package should not embed platform-specific binary
- Remove bin/ directory from npm files, only include bin/cli.js wrapper
- postinstall now always downloads the correct platform binary from release
- Add platform compatibility check: if pre-existing binary doesn't match
  current platform, re-download instead of silently failing

Fixes "cannot execute binary file" on Linux/Windows when npm package was
built on macOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:04:11 +08:00
wbtiger 342badbdd2 feat: add Windows (x64/arm64) support
- Add windows/amd64 and windows/arm64 to build targets with .zip packaging
- Update npm install.js: win32 platform detection, .exe binary, PowerShell zip extraction
- Update npm cli.js wrapper to append .exe on Windows
- Fix credential path to use filepath.Join for cross-platform compatibility
- Update README with Windows support docs and FAQ

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 10:52:56 +08:00
Your GitHub Username 381a32a49f feat: add npm distribution support (@gitlink-ai/cli)
- Add npm package structure (package.json, install script, bin wrapper)
- Add cross-platform build script (darwin/linux × amd64/arm64)
- Add local pack script for embedding binary in npm package
- Update README with larksuite/cli-style installation docs
- Published as @gitlink-ai/cli@0.1.0 on npmjs.com

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 22:57:37 +08:00