Skip to content

Commit e15aff2

Browse files
committed
Move artifacts into ./dist
1 parent 229744d commit e15aff2

6 files changed

Lines changed: 17 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: |
5454
pnpm i --global @vscode/vsce
5555
pnpm package
56-
echo "VSIX_PATH=$(ls *.vsix)" >> "$GITHUB_ENV"
56+
echo "VSIX_PATH=$(ls dist/*.vsix)" >> "$GITHUB_ENV"
5757
5858
- name: Build editor bundles (TextMate, Kate, Notepad++, Geany)
5959
run: pnpm build:editors
@@ -63,9 +63,7 @@ jobs:
6363
if: "!startsWith(github.ref, 'refs/tags/')"
6464
with:
6565
name: bgforge-mls
66-
path: |
67-
*.vsix
68-
bgforge-mls-*.zip
66+
path: dist/
6967

7068
# Use pre-built VSIX for publishing: pnpm package (scripts/package.sh)
7169
# dereferences pnpm symlinks that vsce can't follow.
@@ -103,4 +101,4 @@ jobs:
103101
fail_on_unmatched_files: true
104102
files: |
105103
${{ steps.publishToOpenVSX.outputs.vsixPath }}
106-
bgforge-mls-*.zip
104+
dist/*.zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.vsix
44
*.tmbundle
55
*.zip
6+
dist/
67
syntaxes-to-json.sh.err
78
bgforge-mls-notepadpp-udl*/
89
bgforge-mls-kate-ksh*/

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pnpm-lock.yaml
2424
pnpm-workspace.yaml
2525

2626
# Build artifacts and logs
27+
dist/
2728
*.vsix
2829
*.tgz
2930
*.log

docs/ignore-files.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ These JSON files are generated from `server/data/*.yml` by `generate-data.sh` bu
4545
| `tmp` | Scratch directory |
4646
| `/test` | Root-level test directory |
4747
| `.reports/` | Analysis reports |
48+
| `dist/` | Build artifact directory (VSIX, editor bundles) |
4849
| `*.log`, `*.vsix` | Log files and built extension packages |
4950

5051
The `external/` directory has four allowlisted text files (`!external/fallout.txt`, etc.) that list which repos to clone and what to exclude.
@@ -65,6 +66,7 @@ Controls what ships in the VSIX extension package. Uses a **blocklist** strategy
6566
| `CLAUDE.md`, `CONTRIBUTING.md` | Dev documentation |
6667
| `knip.ts`, `tsconfig.json` | Linting and build config |
6768
| `pnpm-lock.yaml`, `pnpm-workspace.yaml` | Package manager files |
69+
| `dist/` | Build artifact directory (VSIX, editor bundles) |
6870
| `*.vsix`, `*.tgz`, `*.log`, `**/*.map` | Built packages, logs, source maps |
6971
| `*.tmbundle`, `*.zip` | Generated bundles (tmbundle, UDL, KSH archives) |
7072
| `bgforge-mls-notepadpp-udl*/`, `bgforge-mls-kate-ksh*/` | Generated editor asset directories |

scripts/build-editors.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
set -eu -o pipefail
77

88
version=$(node -p "require('./package.json').version")
9+
mkdir -p dist
910

1011
# -- TextMate bundle (Sublime Text / JetBrains) --
1112

1213
tmbundle_name="bgforge-mls"
1314
tmbundle_dir="${tmbundle_name}.tmbundle"
14-
tmbundle_zip="${tmbundle_name}-${version}.tmbundle.zip"
15+
tmbundle_zip="dist/${tmbundle_name}-${version}.tmbundle.zip"
1516

1617
rm -rf "$tmbundle_dir" "$tmbundle_zip"
1718
mkdir -p "$tmbundle_dir/Syntaxes"
@@ -50,7 +51,7 @@ echo "Created $tmbundle_zip"
5051

5152
ksh_name="bgforge-mls-kate-ksh"
5253
ksh_dir="${ksh_name}"
53-
ksh_zip="${ksh_name}-${version}.zip"
54+
ksh_zip="dist/${ksh_name}-${version}.zip"
5455

5556
rm -rf "$ksh_dir" "$ksh_zip"
5657
pnpm exec tsx scripts/utils/src/generate-ksh.ts --out-dir "$ksh_dir"
@@ -64,7 +65,7 @@ echo "Created $ksh_zip"
6465

6566
udl_name="bgforge-mls-notepadpp-udl"
6667
udl_dir="${udl_name}"
67-
udl_zip="${udl_name}-${version}.zip"
68+
udl_zip="dist/${udl_name}-${version}.zip"
6869

6970
rm -rf "$udl_dir" "$udl_zip"
7071
pnpm exec tsx scripts/utils/src/generate-udl.ts --out-dir "$udl_dir"
@@ -78,7 +79,7 @@ echo "Created $udl_zip"
7879

7980
geany_name="bgforge-mls-geany"
8081
geany_dir="${geany_name}"
81-
geany_zip="${geany_name}-${version}.zip"
82+
geany_zip="dist/${geany_name}-${version}.zip"
8283

8384
rm -rf "$geany_dir" "$geany_zip"
8485
pnpm exec tsx scripts/utils/src/generate-geany.ts --out-dir "$geany_dir"

scripts/package.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@ for dir in server/node_modules/@*/; do
4242
done
4343

4444
# Step 3: Package without re-running prepublish.
45-
SKIP_PREPUBLISH=1 pnpm vsce package --no-dependencies "$@"
45+
mkdir -p dist
46+
name=$(node -p "require('./package.json').name")
47+
version=$(node -p "require('./package.json').version")
48+
SKIP_PREPUBLISH=1 pnpm vsce package --no-dependencies --out "dist/${name}-${version}.vsix" "$@"
4649

4750
# Step 4: Inject TS plugins into VSIX.
4851
# vsce excludes node_modules/ entirely with --no-dependencies; re-include
4952
# patterns (!node_modules/pkg/) don't work. Inject the built plugin bundles
5053
# into the VSIX post-packaging. tsserver requires plugins in node_modules/.
51-
name=$(node -p "require('./package.json').name")
52-
version=$(node -p "require('./package.json').version")
53-
vsix_file="./${name}-${version}.vsix"
54+
vsix_file="dist/${name}-${version}.vsix"
5455

5556
if [ ! -f "$vsix_file" ]; then
5657
echo "ERROR: expected $vsix_file not found after vsce package"

0 commit comments

Comments
 (0)