Skip to content

Commit

Permalink
Makefile: replace build-docs by generate
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajolet-hashicorp committed Nov 24, 2023
1 parent 5a8ef80 commit 2967cf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ensure-docs-compiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-go@v4
- shell: bash
run: make build-docs
run: make generate
- shell: bash
run: |
if [[ -z "$(git status -s)" ]]; then
echo "OK"
else
echo "Docs have been updated, but the compiled docs have not been committed."
echo "Run 'make build-docs', and commit the result to resolve this error."
echo "Run 'make generate', and commit the result to resolve this error."
exit 1
fi
14 changes: 4 additions & 10 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ test: fmtcheck
install-packer-sdc: ## Install packer sofware development command
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@${HASHICORP_PACKER_PLUGIN_SDK_VERSION}

ci-release-docs: install-packer-sdc
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
@/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/"

plugin-check: install-packer-sdc build
@packer-sdc plugin-check ${BINARY}

Expand All @@ -32,6 +28,10 @@ testacc: dev

generate: install-packer-sdc
@go generate ./...
@if [ -d ".docs" ]; then rm -r ".docs"; fi
@packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/"
@./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "linode"
@rm -r ".docs"

fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
Expand All @@ -42,9 +42,3 @@ lint: fmtcheck
fmt:
gofmt -w $(GOFMT_FILES)
gofumpt -w .

build-docs: install-packer-sdc
@if [ -d ".docs" ]; then rm -r ".docs"; fi
@packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/"
@./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "linode"
@rm -r ".docs"

0 comments on commit 2967cf8

Please sign in to comment.