Commit Graph

12 Commits

Author SHA1 Message Date
Matej Vašek 8e0b752edc
Apply linter suggestions (#2786)
* Refactor: if-elif-else => switch

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: calls to embedded fields

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix: add missing err checks

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: omit type where possible

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: apply De Morgan's law

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: call ReplaceAll where possible

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-15 09:43:13 +00:00
Matej Vašek 3e8dc4ddc1
feat: embed tkn tasks in func binary (#2396)
* feat: embed tkn tasks in func binary

Embed Tekton tasks for direct on cluster build.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: embed tkn tasks in func binary

Embed Tekton tasks for PaC build.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: added tkn-tasks sub-command

This new command prints tektons tasks in form of multi-document yaml,
these tekton tasks may requird to be installed for some advanced
functionality.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: remove unused files

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: make deployer image settable via linker

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-26 17:48:06 +00:00
Zbynek Roubalik 5a4803bf95
chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-15 08:46:52 +00:00
Adam Boczek 2f021f118b
chore: refactor commands help to use templates (#1485)
* chore: extend help template engine and docs generator to get root use

* chore: refactor deploy cmd

* chore: refactor build cmd

* chore: refactor all relevant commands and remove defaultTemplatedHelp func

* chore: update docs

* chore: remove unused functions

* chore: add template func for rendering sub-templates

* chore: fix for typos
2023-01-16 20:40:53 +00:00
Luke Kingland 30da70e05c
fix: ignore global config on docs gen (#1424) 2022-11-14 21:22:36 +00:00
Luke Kingland 59f4e6a493
fix: mock and noop inconsistency (#1409)
* fix: mock remover missing default impl

* fix: client noop describer should not error

* src: replace generic client factory with test client

* simplify docs generator client
2022-11-07 12:45:22 +00:00
Lance Ball 5adec03c7b
chore: update all references to kn-plugin-func (#1311)
* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: fix instances_test.go

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: still some stray kn-plugin-func

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 16:31:53 +00:00
David Simansky e0bbcc2d08
chore: Refactor use of deprecated io/ioutil package (#1285) 2022-09-27 13:28:15 +00:00
Lance Ball 44ff20d782
chore: remove timestamp from generated docs (#1265)
This is causing trouble with new PRs that potentially change CLI flags
or other user-facing UX. Another option besides completely removing the
version information is to modify Version.StringVerbose() so that it uses
the value of the most recent semver tag (or Knative tag).

```
❯ git describe --match "v*"
v0.34.0-6-g6d26e64c

❯ git describe --match "knative*"
knative-v1.7.0-6-g6d26e64c
```

This is nice, but could be misleading if the UX has changed since that
release.

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-09-21 13:55:10 +00:00
Adam Boczek 4d622bc007
feat: group main help message to put important commands to the top (#1152)
* feat: add initial version of command groups and template engine (#215)

* feat: add relevant dependencies and vendor files (#215)

* feat: extend TestUsageFlags for hidden flags and flags with no shorthand (#215)

* feat: refactor root.go to use command groups (#215)

* feat: move the long help of root cmd to the usage templates section (#215)

* feat: updates after rebase (#215)

* feat: update after review (#215)

* feat: rename 'options' into 'flags' to align with the old help (#215)

* feat: remove support for help options, add template for global flags help section (#215)

* feat: update handling of root command help to support proper use of templates and docs generation (#215)

* feat: generate new docs (#215)
2022-09-13 14:13:48 +00:00
Matej Vasek cd64b70b47
fix: trailing white spaces in genrated docs (#1198)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-30 13:38:18 +00:00
Lance Ball 81289dc757
doc: use cobra markdown generator for command docs (#1169)
This commit removes the docs/reference/commands.txt file and instead
uses the Cobra built-in documentation generator to create markdown
documents for every command.

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-25 13:16:19 +00:00