File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1
1
version : " 3"
2
2
3
+ vars :
4
+ PROJECT_NAME : TODO
5
+
3
6
tasks :
4
7
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml
5
8
docs:gen :
6
9
desc : Generate command reference
7
10
dir : ./docsgen
8
11
cmds :
9
- # docs will generate examples using os.Args[0] so we need to call
10
- # the generator `arduino-lint`
11
- - go build -o arduino-lint{{exeExt}}
12
- # we invoke `arduino-lint` like this instead of `./arduino-lint` to remove
13
- # the `./` chars from the examples
14
- - PATH=. arduino-lint ../docs/commands
12
+ # Command examples use os.Args[0] so the docs generation binary must have the same filename as the project
13
+ - go build -o {{.PROJECT_NAME}}{{exeExt}}
14
+ # The binary is invoked like this instead of `./{{.PROJECT_NAME}}` to remove the `./` chars from the examples
15
+ - PATH=. {{.PROJECT_NAME}} ../docs/commands
15
16
- task : docs:format
Original file line number Diff line number Diff line change 1
1
// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/docsgen/go.mod
2
- module github.com/arduino/arduino-lint/docsgen
2
+ // TODO: replace MODULE_NAME with the project's module name
3
+ module MODULE_NAME/docsgen
3
4
4
5
go 1.14
5
6
6
- replace github.com/arduino/arduino-lint => ../
7
+ replace MODULE_NAME => ../
7
8
8
9
require (
9
- github.com/arduino/arduino-lint v0.0.0
10
+ MODULE_NAME v0.0.0
10
11
github.com/spf13/cobra v1.1.1
11
12
)
Original file line number Diff line number Diff line change 2
2
//
3
3
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
4
4
//
5
- // This software is released under the GNU General Public License version 3,
6
- // which covers the main part of arduino-cli.
5
+ // This software is released under the GNU General Public License version 3.
7
6
// The terms of this license can be found at:
8
7
// https://www.gnu.org/licenses/gpl-3.0.en.html
9
8
//
13
12
// Arduino software without disclosing the source code of your own applications.
14
13
// To purchase a commercial license, send an email to license@arduino.cc.
15
14
16
- // Package main generates Markdown documentation for the Arduino Lint CLI.
15
+ // Package main generates Markdown documentation for the project's CLI.
17
16
package main
18
17
19
18
import (
20
19
"os"
21
20
22
- "github.com/arduino/arduino-lint/internal/cli"
21
+ // TODO: Replace CLI_PACKAGE_NAME with the project's Cobra CLI package name
22
+ "CLI_PACKAGE_NAME"
23
23
"github.com/spf13/cobra/doc"
24
24
)
25
25
You can’t perform that action at this time.
0 commit comments