Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 24 additions & 152 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# agent-pmo:74cf183
# Shipwright SWR-REL-* release pipeline for Diffy.
#
# 1. version — derive semver from the v* tag, capture source SHA
# 2. ci-gate — run `make ci` on the tagged commit; publish is blocked unless this passes
# 3. validate-manifest — schema-check shipwright.json before any artifact is built
# 4. build-vsix matrix — stamp the runner working tree, verify, build, package per platform
# 5. release — assemble the GitHub Release with every VSIX
# 6. publish — push every VSIX to the VS Code Marketplace in one vsce call
#
# Source-controlled versions are never mutated. Stamping happens in the runner
# working tree only, per SWR-VERSION-BUILD-STAMPING.
# Release Diffy on a v* tag: build → package one universal VSIX → publish to the
# VS Code Marketplace → attach it to the GitHub release. One sequential job.
# Pure-TS extension (no native binaries) → a single platform-agnostic VSIX.

name: Release

Expand All @@ -22,95 +14,13 @@ permissions:
contents: write

jobs:
version:
name: Extract release version
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.extract.outputs.version }}
source_sha: ${{ steps.extract.outputs.source_sha }}
steps:
- name: Extract version from tag
id: extract
run: |
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
echo "source_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"

ci-gate:
name: CI gate (make ci)
needs: version
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version.outputs.source_sha }}
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- run: npm ci
- name: Format check
run: make fmt CHECK=1
- name: Lint (includes shipwright.json schema check)
run: make lint
- name: Test (xvfb for @vscode/test-electron)
run: xvfb-run -a make test
- name: Build
run: make build

validate-manifest:
name: Validate shipwright.json
needs: version
release:
name: Package and publish
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version.outputs.source_sha }}
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- run: npm ci
- name: Validate shipwright.json against schema
run: npm run shipwright:validate
- name: Dry-run stamp (proves the script runs against this tag)
run: node scripts/stamp-release-version.mjs "${{ needs.version.outputs.version }}" --dry

build-vsix:
name: Build VSIX (${{ matrix.artifact_name }})
needs: [version, ci-gate, validate-manifest]
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
vsce_target: linux-x64
artifact_name: linux-x64
- os: ubuntu-latest
vsce_target: linux-arm64
artifact_name: linux-arm64
- os: macos-latest
vsce_target: darwin-x64
artifact_name: darwin-x64
- os: macos-latest
vsce_target: darwin-arm64
artifact_name: darwin-arm64
- os: windows-latest
vsce_target: win32-x64
artifact_name: win32-x64
- os: windows-latest
vsce_target: win32-arm64
artifact_name: win32-arm64
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version.outputs.source_sha }}

# VSIX packaging requires Node 22.x per [CI-VSIX-PLATFORM].
- uses: actions/setup-node@v4
with:
node-version: '22.x'
Expand All @@ -119,66 +29,28 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Stamp release version (runner tree only)
run: node scripts/stamp-release-version.mjs "${{ needs.version.outputs.version }}"

- name: Verify every version carrier
run: node scripts/verify-versions.mjs "${{ needs.version.outputs.version }}"
- name: Set version from tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"

- name: Build
run: npm run build

- name: Package VSIX
run: npx vsce package --target ${{ matrix.vsce_target }} --out diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix

- name: Verify VSIX bundles shipwright.json
shell: bash
run: unzip -l diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix | grep -F "extension/shipwright.json"

- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: vsix-${{ matrix.artifact_name }}
path: diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix
- name: Build and package universal VSIX
run: |
npm version "$VERSION" --no-git-tag-version --allow-same-version
npm run build
npx vsce package --out "diffy-$VERSION.vsix"

release:
name: Create release
needs: [version, build-vsix]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version.outputs.source_sha }}
- uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
run: |
if [ -z "$VSCE_PAT" ]; then
echo "::error::VSCODE_MARKETPLACE_PAT not accessible. Add Diffy to the secret's allowed repositories under Org Settings → Secrets and variables → Actions."
exit 1
fi
npx vsce publish --packagePath "diffy-$VERSION.vsix"

- name: Create GitHub release
- name: Attach VSIX to GitHub release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*.vsix
files: diffy-*.vsix
generate_release_notes: true

publish:
name: Publish to VS Code Marketplace
needs: [version, release]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version.outputs.source_sha }}
- uses: actions/download-artifact@v4
with:
path: artifacts/

- uses: actions/setup-node@v4
with:
node-version: '22.x'

# Publish all platform-specific VSIX files in a single vsce invocation.
- name: Publish to Marketplace
run: npx vsce publish --packagePath $(find artifacts -name '*.vsix')
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
prerelease: ${{ contains(github.ref_name, '-') }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ build/

# Shipwright SWR-VERSION-BUILD-STAMPING — release-time artifact, never committed
build-info.json

# E2E fixture — script-built throwaway repo, regenerated by seed.sh (never commit)
test-fixtures/repo-seed/workspace/
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Changelog

All notable changes to **Diffy** are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and Diffy adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] — Unreleased

Initial release.

### Added

- **Diffy: Compare with…** (`diffy.compareWith`) on right-click of a commit in
the SCM History view. Side B is selected from a QuickPick: Working Copy,
Index, another commit, or a branch/tag.
- **Diffy: Compare with Working Copy** (`diffy.compareWithWorkingCopy`) on
right-click of a commit. Skips the Side B prompt.
- **Diffy: Compare with Previous** (`diffy.compareWithPrevious`) on right-click
of a commit. Diffs against the commit's first parent.
- **Diffy: Compare with Commit…** (`diffy.compareFileWithCommit`) on right-click
of a changed file in SCM Changes, an editor tab, or the File Explorer. Opens a
single-file diff against the chosen commit.
- **Diffy: Compare Two Commits** (`diffy.compareTwoCommits`) in the Command
Palette. Full QuickPick chain: repo → Side A commit → Side B → files.
- **Diffy: Reopen Last Comparison** (`diffy.reopenLast`) reopens the file picker
for the most recent A↔B comparison (stored per workspace).
- **Diffy: Show Logs** (`diffy.showLogs`, hidden from the palette) surfaces the
Diffy OutputChannel.
- Multi-step QuickPick that stays open after each file is opened, so a single
comparison can drive many diffs in a row.
- Human-first diff tab titles: `${shortShaA} ↔ ${shortShaB} — ${basename}` or
`${shortSha} ↔ Working Copy — ${basename}`.
- Structured logging (pino) to a state-folder file and the Diffy OutputChannel.

[0.1.0]: https://github.com/MelbourneDeveloper/Diffy/releases/tag/v0.1.0
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<!-- agent-pmo:74cf183 -->

⚠️ KILLING A VSCODE PROCESS — EVEN IN THE BROWSER — WILL BE MET WITH INSTANT, EXTREME VIOLENCE!
⚠️ DO NOT KILL VSCODE PROCESSES ⚠️

> ⚠️ **TOKEN DISCIPLINE.** Check file size first. `Grep` over `Read`. Use `offset`/`limit`.
> Smallest diff that solves the problem. Delete dead code, unused imports, stale comments.
> Call out irrelevant context before proceeding. Bloat degrades reasoning. ⚠️
⚠️ **TOKEN DISCIPLINE.** Check file size first. `Grep` over `Read`. Use `offset`/`limit`.
Smallest diff that solves the problem. Delete dead code, unused imports, stale comments.
Call out irrelevant context before proceeding. Bloat degrades reasoning. ⚠️

> ⚠️ **CRITICAL: THIS CODEBASE RECEIVES A GRADE OF A+.** WE DON'T ALLOW BAD CODE. NOT EVEN FOR ONE LINE. CODE MUST PASS REVIEW AT Google / Meta / Microsoft. ANYTHING LESS IS ⛔️ ILLEGAL AND MUST BE FIXED IMMEDIATELY.
⚠️ **CRITICAL: THIS CODEBASE RECEIVES A GRADE OF A+.** WE DON'T ALLOW BAD CODE. NOT EVEN FOR ONE LINE. CODE MUST PASS REVIEW AT Google / Meta / Microsoft. ANYTHING LESS IS ⛔️ ILLEGAL AND MUST BE FIXED IMMEDIATELY.⚠️

⚠️ **NEW VIEWS, ACTIVITY-BAR ICONS, SIDEBARS, TREE PROVIDERS, OR WEBVIEWS ARE ⛔️ ILLEGAL.**
Diffy is **context-menu only**. Every feature hangs off VSCode's existing SCM history, SCM resource state, editor title, and explorer menus — plus a small set of palette commands. If a feature needs a new panel to exist, the feature is wrong.
Diffy is **context-menu only**. Every feature hangs off VSCode's existing SCM history, SCM resource state, editor title, and explorer menus — plus a small set of palette commands. If a feature needs a new panel to exist, the feature is wrong.⚠️

Full design + execution plan: [spec.md](spec.md).

Expand Down
Loading
Loading