Skip to content

Commit

Permalink
Merge pull request #1341 from hthiery/feature/add-build-to-hook
Browse files Browse the repository at this point in the history
src/install: add bundle/manifest build value to hook environment
  • Loading branch information
jluebbe committed Feb 22, 2024
2 parents 9419d71 + 85e8a51 commit 5a2e917
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,10 @@ The following environment variables will be passed to the hook executable:
The value of the version field as provided by the current bundle,
e.g. ``"V1.2.1-2020-02-28"``

``RAUC_MF_BUILD``
The value of the build field as provided by the current bundle,
e.g. ``"20240205092747"``

``RAUC_MOUNT_PREFIX``
The global RAUC mount prefix path, e.g. ``"/run/mount/rauc"``

Expand Down
1 change: 1 addition & 0 deletions src/install.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ static gboolean run_bundle_hook(RaucManifest *manifest, gchar* bundledir, const

g_subprocess_launcher_setenv(launcher, "RAUC_MF_COMPATIBLE", manifest->update_compatible, TRUE);
g_subprocess_launcher_setenv(launcher, "RAUC_MF_VERSION", manifest->update_version ?: "", TRUE);
g_subprocess_launcher_setenv(launcher, "RAUC_MF_BUILD", manifest->update_build ?: "", TRUE);
g_subprocess_launcher_setenv(launcher, "RAUC_MOUNT_PREFIX", r_context()->config->mount_prefix, TRUE);

sproc = g_subprocess_launcher_spawn(
Expand Down

0 comments on commit 5a2e917

Please sign in to comment.