summaryrefslogtreecommitdiffstats
path: root/classes/target_version_example.bbclass
diff options
context:
space:
mode:
authorAnton Gerasimov <anton.gerasimov@here.com>2018-09-04 16:56:01 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2018-10-31 13:34:37 +0100
commite65e6dd24d0114158a7eb02a36d31dab845bac3d (patch)
tree07d1f4b6f3a48dd4736e94e7c3f7425f46b225f7 /classes/target_version_example.bbclass
parentfdbf88415985ac4543bdf8737cc4607e489fa04f (diff)
downloadmeta-updater-e65e6dd24d0114158a7eb02a36d31dab845bac3d.tar.gz
Provide example for setting UPTANE target version automatically
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;"