Skip to content

Commit

Permalink
cli: Use Meson in Vala checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego-Ivan committed Oct 14, 2024
1 parent 4696398 commit fc77803
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,30 @@ async function ci({ filenames }) {
const languageId = "vala";
let version = 0;

const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
"workbench.vala",
);
file_api.copy(
const current_dir = Gio.File.new_for_path(GLib.get_current_dir());

const template_dir = GLib.getenv("FLATPAK_ID")
? Gio.File.new_for_path(
`/app/share/${GLib.getenv("FLATPAK_ID")}/langs/vala/template`,
)
: current_dir.resolve_relative_path("src/langs/vala/template");

const api_file = template_dir.get_child("workbench.vala");
api_file.copy(
demo_dir.get_child("workbench.vala"),
Gio.FileCopyFlags.OVERWRITE,
null,
null,
);

const meson_file = template_dir.get_child("meson.build");
meson_file.copy(
demo_dir.get_child("meson.build"),
Gio.FileCopyFlags.OVERWRITE,
null,
null,
);

const [contents] = await file_vala.load_contents_async(null);
const text = new TextDecoder().decode(contents);

Expand Down

0 comments on commit fc77803

Please sign in to comment.