Skip to content

Commit

Permalink
ci: fix stamping for builds performed in CI (#45147)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
devversion authored and thePunderWoman committed Feb 25, 2022
1 parent e01820c commit e56472d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion .circleci/env.sh
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -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
Expand Down

0 comments on commit e56472d

Please sign in to comment.