mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-23 19:51:09 +01:00
ci: 'atomically' update .circleci/config.yml (#7449)
- Updates .circleci/Makefile to match
7cd733a000
This commit is contained in:
parent
e498f0b906
commit
cf134e88f5
@ -60,10 +60,14 @@ define GENERATED_FILE_HEADER
|
||||
endef
|
||||
export GENERATED_FILE_HEADER
|
||||
|
||||
# GEN_CONFIG writes the config to a temporary file. If the whole process succeeds,
|
||||
# it then moves that file to $@. This makes is an atomic operation, so if it fails
|
||||
# make doesn't consider a half-baked file up to date.
|
||||
define GEN_CONFIG
|
||||
@$(CIRCLECI) config pack $(SOURCE_DIR) > $(CONFIG_PACKED)
|
||||
@echo "$$GENERATED_FILE_HEADER" > $@
|
||||
@$(CIRCLECI) config process $(CONFIG_PACKED) >> $@
|
||||
@echo "$$GENERATED_FILE_HEADER" > $@.tmp || { rm -f $@; exit 1; }
|
||||
@$(CIRCLECI) config process $(CONFIG_PACKED) >> $@.tmp || { rm -f $@.tmp; exit 1; }
|
||||
@mv -f $@.tmp $@
|
||||
endef
|
||||
|
||||
$(OUT): $(CONFIG_SOURCE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user