diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c223238..937d6862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Unreleased + +## Features + +- Include timestamp and tags in the candid provenance record. + # 2023.10.15-0600Z ## Overview diff --git a/scripts/import-candid b/scripts/import-candid index c1b17321..817e1538 100755 --- a/scripts/import-candid +++ b/scripts/import-candid @@ -18,7 +18,7 @@ import_did() { local out_path="packages/${pkg}/candid/${out_filename}" echo "Copying ${in_fullpath} -> REPO_ROOT/${out_path}" { - echo "// Generated from IC repo commit ${IC_COMMIT} '${in_path}' by $(basename "${0}")" + echo "// Generated from IC repo commit ${IC_COMMIT} (${IC_DATE}${IC_TAGS:+ tags: ${IC_TAGS% }}) '${in_path}' by $(basename "${0}")" cat "$in_fullpath" } >"${out_path}" } @@ -50,7 +50,9 @@ test -n "${IC_DIR:-}" || { echo " Use --help for usage." exit 1 } >&2 -IC_COMMIT="$(cd "${IC_DIR}" && git rev-parse HEAD)" +IC_COMMIT="$(cd "${IC_DIR}" && git rev-parse --short HEAD)" +IC_DATE="$(cd "${IC_DIR}" && git show -s --format=%as)" +IC_TAGS="$(cd "${IC_DIR}" && git tag --points-at HEAD | tr "\n" " ")" THIS_SCRIPT_NAME="$(basename "$0")" : Import canisters