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
committerAnton Gerasimov <anton.gerasimov@here.com>2018-10-09 16:11:04 +0200
commite2c03bd809ddefa9d164b5ba20f8d01957ce2f86 (patch)
tree5af6ddefbc57728185cd1a11226eb446262f80fb /classes/target_version_example.bbclass
parent42972f0db05b4057a8c552cc10abfc8a634338be (diff)
downloadmeta-updater-e2c03bd809ddefa9d164b5ba20f8d01957ce2f86.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;"