From 61f7690265ab1a8c3827e3fcd9353cb6b64b3fb4 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 2 Aug 2024 07:38:25 -0800 Subject: [PATCH] ci: Update build number on dev builds with Discord notification (#381) --- .gitlab-ci.yml | 3 +++ release/ci/discord_template_notify_dev_public.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13b30a6af..23881001f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -230,6 +230,9 @@ notify new dev build: needs: ["publish to public github prebuilt"] # This notify shall only happen after a publish to github public variables: TEMPLATE: "discord_template_notify_dev_public.json" + before_script: + - !reference [".notify_discord", "before_script"] + - export EXTRA_VERSION_IDENTIFIER=$((CI_PIPELINE_IID + BASE_BUILD_NUMER)) rules: - if: $NEW_BRANCH == "dev-c3" variables: diff --git a/release/ci/discord_template_notify_dev_public.json b/release/ci/discord_template_notify_dev_public.json index d1a7b37f9..c933ea10b 100644 --- a/release/ci/discord_template_notify_dev_public.json +++ b/release/ci/discord_template_notify_dev_public.json @@ -2,7 +2,7 @@ "embeds": [ { "title": "🎉 sunnypilot `${NEW_BRANCH}` New Update 🎉", - "description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${CI_PIPELINE_IID} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨", + "description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${EXTRA_VERSION_IDENTIFIER} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨", "color": 4321431 } ]