Skip to content

Commit

Permalink
makefile: remove old docs targets (#340)
Browse files Browse the repository at this point in the history
* makefile: remove old docs targets

Since we moved the docs to integrations, we don't need to build the
docs.zip file anymore, and to make it easier for plugin developers we
move the logic for building the new .docs directory to the `generate'
Makefile target.

* .github: remove ensure-docs-compiled workflow

Since the workflow relies on the build-docs target existing in the
Makefile to ensure we don't commit a change without calling it, and
since we removed it in the previous commit to fold it in generate, we
don't need it anymore so we can remove it.

Since the `make generate' call is already required if modifying the
docs, and we check that during validate, this is safe to remove.

* Makefile: remove superfluous renderdocs

Since we have merged `build-docs' with `generate', we don't need to
manually invoke `packer-sdc renderdocs' before the old build-docs.

* goreleaser: don't rely on ci-make-docs

Since the ci-make-docs target is no longer part of the Makefile, we
cannot rely on it for making the latest docs, and therefore we must
remove that from the goreleaser file too.

* goreleaser: don't include docs.zip in release

The docs.zip file should not be part of the release as it is no longer
generated nor required to build the docs for a plugin.

Keeping this in the releaser config caused the release to fail before
the artifacts were updated, leading to a corrupted release.
  • Loading branch information
lbajolet-hashicorp authored Oct 6, 2023
1 parent 976fce1 commit 39ea3e7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/ensure-docs-compiled.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ before:
# We strongly recommend running tests to catch any regression before release.
# Even though, this an optional step.
- go test ./...
# As part of the release doc files are included as a separate deliverable for
# consumption by Packer.io. To include a separate docs.zip uncomment the following command.
- make ci-release-docs
# Check plugin compatibility with required version of the Packer SDK
- make plugin-check
builds:
Expand Down Expand Up @@ -98,13 +95,6 @@ signs:
args: ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
artifacts: checksum
signature: ${artifact}.sig
release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
# As part of the release doc files are included as a separate deliverable for consumption by Packer.io.
# To include a separate docs.zip uncomment the extra_files config and the docs.zip command hook above.
extra_files:
- glob: ./docs.zip

changelog:
use: github-native
10 changes: 1 addition & 9 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ test:
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,11 +28,7 @@ testacc: dev

generate: install-packer-sdc
@go generate ./...
packer-sdc renderdocs -src ./docs -dst ./.docs -partials ./docs-partials
# checkout the .docs folder for a preview of the docs

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

0 comments on commit 39ea3e7

Please sign in to comment.