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 Jul 13, 2024
1 parent a61df96 commit 8d6f639
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,18 +354,28 @@ async function ci({ filenames, current_dir }) {
const languageId = "vala";
let version = 0;

const api_file = (
GLib.getenv("FLATPAK_ID")
? Gio.File.new_for_path(`/app/share/${GLib.getenv("FLATPAK_ID")}`)
: current_dir.resolve_relative_path("src/langs/vala")
).get_child("workbench.vala");
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 8d6f639

Please sign in to comment.