Skip to content

Commit fc77803

Browse files
committed
cli: Use Meson in Vala checks
1 parent 4696398 commit fc77803

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

src/cli/main.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,16 +352,30 @@ async function ci({ filenames }) {
352352
const languageId = "vala";
353353
let version = 0;
354354

355-
const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
356-
"workbench.vala",
357-
);
358-
file_api.copy(
355+
const current_dir = Gio.File.new_for_path(GLib.get_current_dir());
356+
357+
const template_dir = GLib.getenv("FLATPAK_ID")
358+
? Gio.File.new_for_path(
359+
`/app/share/${GLib.getenv("FLATPAK_ID")}/langs/vala/template`,
360+
)
361+
: current_dir.resolve_relative_path("src/langs/vala/template");
362+
363+
const api_file = template_dir.get_child("workbench.vala");
364+
api_file.copy(
359365
demo_dir.get_child("workbench.vala"),
360366
Gio.FileCopyFlags.OVERWRITE,
361367
null,
362368
null,
363369
);
364370

371+
const meson_file = template_dir.get_child("meson.build");
372+
meson_file.copy(
373+
demo_dir.get_child("meson.build"),
374+
Gio.FileCopyFlags.OVERWRITE,
375+
null,
376+
null,
377+
);
378+
365379
const [contents] = await file_vala.load_contents_async(null);
366380
const text = new TextDecoder().decode(contents);
367381

0 commit comments

Comments
 (0)