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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
- name: Svelte check
run: pnpm check

- name: Build site and verify installer
- name: Build site
run: pnpm build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/test-results/
/playwright-report/
/static/install.sh
/static/install.ps1
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"private": true,
"type": "module",
"scripts": {
"sync:installer": "node scripts/sync-installer.mjs",
"dev": "node scripts/sync-installer.mjs && vite dev",
"build": "node scripts/sync-installer.mjs && vite build && node scripts/verify-build.mjs",
"dev": "vite dev",
"build": "vite build && node scripts/verify-build.mjs",
"preview": "vite preview",
"check": "node scripts/sync-installer.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.10",
Expand Down
85 changes: 0 additions & 85 deletions scripts/sync-installer.mjs

This file was deleted.

40 changes: 2 additions & 38 deletions scripts/verify-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,6 @@ import { fileURLToPath } from 'node:url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const ROOT_DIR = resolve(__dirname, '..');

const installers = [
{
name: 'install.sh',
path: resolve(ROOT_DIR, 'build/install.sh'),
validate(content) {
return content.startsWith('#!/usr/bin/env bash') || content.startsWith('#!/bin/bash');
},
error: 'build/install.sh has an invalid shebang.'
},
{
name: 'install.ps1',
path: resolve(ROOT_DIR, 'build/install.ps1'),
validate(content) {
return content.includes('[CmdletBinding()]') && content.includes('x86_64-pc-windows-msvc');
},
error: 'build/install.ps1 is missing the expected PowerShell installer contract.'
}
];

for (const installer of installers) {
if (!existsSync(installer.path)) {
console.error(`[verify-build] Error: build/${installer.name} does not exist.`);
process.exit(1);
}

const content = readFileSync(installer.path, 'utf8');
if (!installer.validate(content)) {
console.error(`[verify-build] Error: ${installer.error}`);
process.exit(1);
}
if (!content.includes('wright') || !content.includes('wright-lsp')) {
console.error(`[verify-build] Error: build/${installer.name} is missing wright binary references.`);
process.exit(1);
}
}

// Each locale must ship as its own prerendered page with correct language
// metadata, and commands and captured CLI output must stay untranslated.
const SITE_URL = 'https://wrightkit.dev';
Expand All @@ -50,7 +14,7 @@ const pages = [
{ file: 'zh-CN.html', lang: 'zh-CN', canonical: `${SITE_URL}/zh-CN` }
];
const literals = [
'curl -fsSL https://wrightkit.dev/install.sh | bash',
'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash',
'brew install wrightkit/tap/wright',
'wright lint rules.txt',
'warning[min-wait-loop]: loop body waits at the workshop minimum rate',
Expand Down Expand Up @@ -79,4 +43,4 @@ for (const page of pages) {
}
}

console.log(`[verify-build] OK: installers and ${pages.length} localized pages verified.`);
console.log(`[verify-build] OK: ${pages.length} localized pages verified.`);
14 changes: 7 additions & 7 deletions src/lib/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const site = {
msrv: '1.85'
} as const;

export const quickInstall = 'curl -fsSL https://wrightkit.dev/install.sh | bash';
export const quickInstall = 'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash';

export const navSections = ['start', 'features', 'languages', 'install'] as const;
export type NavSection = (typeof navSections)[number];
Expand Down Expand Up @@ -157,23 +157,23 @@ export const installTargets = [
{
id: 'macos',
command: 'brew install wrightkit/tap/wright',
altCommand: 'curl -fsSL https://wrightkit.dev/install.sh | bash'
altCommand: 'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash'
},
{
id: 'linux',
command: 'curl -fsSL https://wrightkit.dev/install.sh | bash',
altCommand: 'curl -fsSL https://wrightkit.dev/install.sh | bash -s -- --dir ~/.local/bin'
command: 'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash',
altCommand: 'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash -s -- --dir ~/.local/bin'
},
{
id: 'windows',
command: 'irm https://wrightkit.dev/install.ps1 | iex',
command: 'irm https://install.wrightkit.dev/wright/install.ps1 | iex',
altCommand:
'$script = irm https://wrightkit.dev/install.ps1; & ([scriptblock]::Create($script)) -InstallDir "$HOME\\bin"'
'$script = irm https://install.wrightkit.dev/wright/install.ps1; & ([scriptblock]::Create($script)) -InstallDir "$HOME\\bin"'
},
{
id: 'ci',
command:
'curl -fsSL https://wrightkit.dev/install.sh | bash -s -- --version "$WRIGHT_VERSION"',
'curl -fsSL https://install.wrightkit.dev/wright/install.sh | bash -s -- --version "$WRIGHT_VERSION"',
altCommand: 'wright lint src/main.opy --format json'
},
{
Expand Down
Loading