From 9f49a27c124051034d5d11853f39341879156a7f Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 7 Oct 2020 09:54:27 +1100 Subject: [PATCH] ci: Check version tags are always annotated Closes https://github.com/espressif/esp-idf/issues/3114 --- tools/ci/config/pre_check.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/ci/config/pre_check.yml b/tools/ci/config/pre_check.yml index 6f4baca8fa..b1883a8174 100644 --- a/tools/ci/config/pre_check.yml +++ b/tools/ci/config/pre_check.yml @@ -155,3 +155,16 @@ build_template_app: - for dir in esp32 esp32s2beta; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done; - for dir in esp32 esp32s2beta; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done; - popd + +# For release tag pipelines only, make sure the tag was created with 'git tag -a' so it will update +# the version returned by 'git describe' +check_version_tag: + extends: .check_job_template + only: + refs: + - /^v\d+\.\d+(\.\d+)?($|-)/ + variables: + - $BOT_TRIGGER_WITH_LABEL == null + script: + - (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || echo "ESP-IDF versions must be annotated tags." && exit 1 +