diff options
Diffstat (limited to 'classes/target_version_example.bbclass')
-rw-r--r-- | classes/target_version_example.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass new file mode 100644 index 0000000..ef119fb --- /dev/null +++ b/classes/target_version_example.bbclass | |||
@@ -0,0 +1,10 @@ | |||
1 | # Writes target version to be used by garage-sign | ||
2 | |||
3 | HOSTTOOLS += " git " | ||
4 | |||
5 | deploy_target_version () { | ||
6 | version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) | ||
7 | echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version | ||
8 | } | ||
9 | |||
10 | IMAGE_PREPROCESS_COMMAND += "deploy_target_version;" | ||