Commit 09853649 authored by Christian Hergert's avatar Christian Hergert
Browse files

foundry: add API to get project version

parent 343705b7
......@@ -672,3 +672,26 @@ ide_build_system_supports_toolchain (IdeBuildSystem *self,
return FALSE;
* ide_build_system_get_project_version:
* @self: a #IdeBuildSystem
* If the build system supports it, gets the project version as configured
* in the build system's configuration files.
* Returns: (transfer full) (nullable): a string containing the project version
* Since: 3.32
gchar *
ide_build_system_get_project_version (IdeBuildSystem *self)
g_return_val_if_fail (IDE_IS_MAIN_THREAD (), NULL);
g_return_val_if_fail (IDE_IS_BUILD_SYSTEM (self), NULL);
if (IDE_BUILD_SYSTEM_GET_IFACE (self)->get_project_version)
return IDE_BUILD_SYSTEM_GET_IFACE (self)->get_project_version (self);
return NULL;
......@@ -63,6 +63,7 @@ struct _IdeBuildSystemInterface
gchar *(*get_display_name) (IdeBuildSystem *self);
gboolean (*supports_toolchain) (IdeBuildSystem *self,
IdeToolchain *toolchain);
gchar *(*get_project_version) (IdeBuildSystem *self);
......@@ -77,6 +78,8 @@ IDE_AVAILABLE_IN_3_32
gchar *ide_build_system_get_builddir (IdeBuildSystem *self,
IdeBuildPipeline *pipeline);
gchar *ide_build_system_get_project_version (IdeBuildSystem *self);
void ide_build_system_get_build_flags_async (IdeBuildSystem *self,
GFile *file,
GCancellable *cancellable,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment