diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fbf599df..5906bd38a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,7 @@ jobs: run: make vendor vendor.check - name: Check Diff + id: check-diff run: | mkdir _output make check-diff @@ -126,6 +127,10 @@ jobs: # to save a skipped resource list SKIPPED_RESOURCES_CSV: ../_output/skipped_resources.csv + - name: Show diff + if: failure() && steps.check-diff.outcome == 'failure' + run: git diff + - name: Report Statistics run: head -1 _output/skipped_resources.csv diff --git a/Makefile b/Makefile index 584a6c4b9..11667e04e 100644 --- a/Makefile +++ b/Makefile @@ -141,9 +141,8 @@ $(TERRAFORM_PROVIDER_SCHEMA): $(TERRAFORM) @$(OK) generating provider schema for $(TERRAFORM_PROVIDER_SOURCE) $(TERRAFORM_PROVIDER_VERSION) pull-docs: - @if [ ! -d "$(WORK_DIR)/$(notdir $(TERRAFORM_PROVIDER_REPO))" ]; then \ - git clone -c advice.detachedHead=false --depth 1 --filter=blob:none --branch "v$(TERRAFORM_PROVIDER_VERSION)" --sparse "$(TERRAFORM_PROVIDER_REPO)" "$(WORK_DIR)/$(notdir $(TERRAFORM_PROVIDER_REPO))"; \ - fi + rm -fR "$(WORK_DIR)/$(notdir $(TERRAFORM_PROVIDER_REPO))" + git clone -c advice.detachedHead=false --depth 1 --filter=blob:none --branch "v$(TERRAFORM_PROVIDER_VERSION)" --sparse "$(TERRAFORM_PROVIDER_REPO)" "$(WORK_DIR)/$(notdir $(TERRAFORM_PROVIDER_REPO))"; @git -C "$(WORK_DIR)/$(notdir $(TERRAFORM_PROVIDER_REPO))" sparse-checkout set "$(TERRAFORM_DOCS_PATH)" generate.init: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs