summaryrefslogtreecommitdiffstats
path: root/classes/target_version_example.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/target_version_example.bbclass')
-rw-r--r--classes/target_version_example.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass
new file mode 100644
index 0000000..5adf159
--- /dev/null
+++ b/classes/target_version_example.bbclass
@@ -0,0 +1,11 @@
1# Writes uses repo manifest version as a target version
2#
3
4HOSTTOOLS += " git "
5
6deploy_target_version () {
7 version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD)
8 echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version
9}
10
11IMAGE_PREPROCESS_COMMAND += "deploy_target_version;"