From e56472d3c2936d2395e3d175e7076f771683a149 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 20 Feb 2022 11:27:27 +0100 Subject: [PATCH] ci: fix stamping for builds performed in CI (#45147) Fixes the stamping for snapshot builds and the artifact deployment job. Currently the stamped versions will have the `.with-local-changes` version suffix given that we add a file to the Git repo that is just needed for the CircleCI cache key computation. PR Close #45147 --- .circleci/config.yml | 2 ++ .circleci/env.sh | 1 - .gitignore | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7610ba559ed..4c04a7091d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -188,6 +188,8 @@ commands: steps: - run: name: Save month to file + # Note: Make sure this file is excluded in the `.gitignore` as otherwise the + # snapshot stamping would have the `-with-local-changes` suffix. command: date +%Y-%m > month.txt # Normally this would be an individual job instead of a command. diff --git a/.circleci/env.sh b/.circleci/env.sh index 177ac4cfecf..2dfcdf0e0fb 100755 --- a/.circleci/env.sh +++ b/.circleci/env.sh @@ -3,7 +3,6 @@ # Variables readonly projectDir=$(realpath "$(dirname ${BASH_SOURCE[0]})/..") readonly envHelpersPath="$projectDir/.circleci/env-helpers.inc.sh"; -readonly bashEnvCachePath="$projectDir/.circleci/bash_env_cache"; # Load helpers and make them available everywhere (through `$BASH_ENV`). source $envHelpersPath; diff --git a/.gitignore b/.gitignore index 140aed39fc0..e6081cab0bc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,10 @@ *.log node_modules +# CircleCI temporary file for cache key computation. +# See `save_month_to_file` in `.circleci/config.yml`. +month.txt + # Include when developing application packages. pubspec.lock .c9