diff options
author | Anton Gerasimov <anton.gerasimov@here.com> | 2018-09-04 16:56:01 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-10-30 13:39:51 +0100 |
commit | 824e5a7c9c4241d0f32ee777768b00249b47ad8a (patch) | |
tree | 5789b2fbf595b5de8da0848a828d131abee761a5 /classes/target_version_example.bbclass | |
parent | 0efe3823ea039213a1640d469d35d56fc68be60f (diff) | |
download | meta-updater-824e5a7c9c4241d0f32ee777768b00249b47ad8a.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.bbclass | 11 |
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 | |||
4 | HOSTTOOLS += " git " | ||
5 | |||
6 | deploy_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 | |||
11 | IMAGE_PREPROCESS_COMMAND += "deploy_target_version;" | ||