diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 1c34818cd..5b7a641a3 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -12,26 +12,13 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - path: operator-controller - - uses: actions/setup-go@v5 - with: - go-version-file: "operator-controller/go.mod" - - name: Get catalogd version - id: get-catalogd-version - run: | - cd operator-controller - echo "CATALOGD_VERSION=$(go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/catalogd)" >> "$GITHUB_OUTPUT" - - uses: actions/checkout@v4 - with: - repository: operator-framework/catalogd - path: catalogd - ref: "${{ steps.get-catalogd-version.outputs.CATALOGD_VERSION }}" - - name: Run verification checks - run: | - cd operator-controller - make verify + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + - name: Run verification checks + run: make verify lint: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index d7ffdb1b3..305a463ba 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ install.sh site .tiltbuild/ -.vscode \ No newline at end of file +.catalogd-tmp/ +.vscode diff --git a/Makefile b/Makefile index afca4ce82..2b07b3ab2 100644 --- a/Makefile +++ b/Makefile @@ -311,16 +311,19 @@ quickstart: $(KUSTOMIZE) manifests #EXHELP Generate the installation release man .PHONY: crd-ref-docs OPERATOR_CONTROLLER_API_REFERENCE_FILENAME := operator-controller-api-reference.md CATALOGD_API_REFERENCE_FILENAME := catalogd-api-reference.md -CATALOGD_PATH := "$(ROOT_DIR)/../catalogd" -crd-ref-docs: $(CRD_REF_DOCS) #EXHELP Generate the API Reference Documents. NOTE: catalogd must be cloned into operator-controller's parent directory. +CATALOGD_TMP_DIR := $(ROOT_DIR)/.catalogd-tmp/ +crd-ref-docs: $(CRD_REF_DOCS) #EXHELP Generate the API Reference Documents. rm -f $(ROOT_DIR)/docs/refs/api/$(OPERATOR_CONTROLLER_API_REFERENCE_FILENAME) $(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/api \ --config=$(ROOT_DIR)/docs/refs/api/crd-ref-docs-gen-config.yaml \ --renderer=markdown --output-path=$(ROOT_DIR)/docs/refs/api/$(OPERATOR_CONTROLLER_API_REFERENCE_FILENAME); + rm -rf $(CATALOGD_TMP_DIR) + git clone --depth 1 --branch $(CATALOGD_VERSION) https://github.com/operator-framework/catalogd $(CATALOGD_TMP_DIR) rm -f $(ROOT_DIR)/docs/refs/api/$(CATALOGD_API_REFERENCE_FILENAME) - $(CRD_REF_DOCS) --source-path=$(CATALOGD_PATH)/api \ + $(CRD_REF_DOCS) --source-path=$(CATALOGD_TMP_DIR)/api \ --config=$(ROOT_DIR)/docs/refs/api/crd-ref-docs-gen-config.yaml \ --renderer=markdown --output-path=$(ROOT_DIR)/docs/refs/api/$(CATALOGD_API_REFERENCE_FILENAME) + rm -rf $(CATALOGD_TMP_DIR)/ VENVDIR := $(abspath docs/.venv)