mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
don't show cli docs in UI
This commit is contained in:
parent
92400d25d0
commit
00739ac1ec
@ -37,15 +37,6 @@ when:
|
|||||||
evaluate: 'TASK == "docs"'
|
evaluate: 'TASK == "docs"'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-cli:
|
|
||||||
image: *golang_image
|
|
||||||
commands:
|
|
||||||
- make docs
|
|
||||||
when:
|
|
||||||
- path: *when_path
|
|
||||||
event: [tag, pull_request, push]
|
|
||||||
- event: manual
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: docs/
|
directory: docs/
|
||||||
|
13
Makefile
13
Makefile
@ -109,7 +109,7 @@ clean: ## Clean build artifacts
|
|||||||
clean-all: clean ## Clean all artifacts
|
clean-all: clean ## Clean all artifacts
|
||||||
rm -rf ${DIST_DIR} web/dist docs/build docs/node_modules web/node_modules
|
rm -rf ${DIST_DIR} web/dist docs/build docs/node_modules web/node_modules
|
||||||
# delete generated
|
# delete generated
|
||||||
rm -rf docs/docs/40-cli.md docs/openapi.json
|
rm -rf docs/openapi.json
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate: install-tools generate-openapi ## Run all code generations
|
generate: install-tools generate-openapi ## Run all code generations
|
||||||
@ -216,6 +216,11 @@ build-tarball: ## Build tar archive
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: build-agent build-server build-cli ## Build all binaries
|
build: build-agent build-server build-cli ## Build all binaries
|
||||||
|
|
||||||
|
##@ Docs
|
||||||
|
|
||||||
|
build-docs:
|
||||||
|
cd docs; pnpm install --frozen-lockfile; pnpm build
|
||||||
|
|
||||||
release-frontend: build-frontend ## Build frontend
|
release-frontend: build-frontend ## Build frontend
|
||||||
|
|
||||||
cross-compile-server: ## Cross compile the server
|
cross-compile-server: ## Cross compile the server
|
||||||
@ -336,10 +341,4 @@ spellcheck:
|
|||||||
-I versioned_docs -I '*opensource.svg' | \
|
-I versioned_docs -I '*opensource.svg' | \
|
||||||
pnpx cspell lint --no-progress stdin
|
pnpx cspell lint --no-progress stdin
|
||||||
|
|
||||||
##@ Docs
|
|
||||||
.PHONY: docs
|
|
||||||
docs: ## Generate docs (currently only for the cli)
|
|
||||||
CGO_ENABLED=0 go generate cmd/cli/app.go
|
|
||||||
CGO_ENABLED=0 go generate cmd/server/openapi.go
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
// Copyright 2021 Woodpecker Authors
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
//go:build generate
|
|
||||||
// +build generate
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
|
|
||||||
docs "github.com/urfave/cli-docs/v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
app := newApp()
|
|
||||||
md, err := docs.ToMarkdown(app)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
fi, err := os.Create("../../docs/docs/40-cli.md")
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
defer fi.Close()
|
|
||||||
if _, err := fi.WriteString("# CLI\n\n" + md); err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user