Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make test fail if docs is not up to date #1913

Merged
merged 2 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/docs.yaml → .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ jobs:
- uses: actions/checkout@v2
- name: Generate code
run: go run ./cmd/scw-doc-gen
- name: Compute git status
run: gitStatus=$(git status --porcelain)
- name: Show git status
run: echo $gitStatus
- name: Error if non empty
run: "[ -z $gitStatus ]"
env:
# We need this to enable autocomplete documentation generation default
SHELL: /bin/bash
- name: Exit 1 if not empty
run: git diff --exit-code
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-config-get-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EXAMPLES:
scw -p prod config get default_region

ARGS:
key the key to get from the configt (access-key | secret-key | api-url | insecure | default-organization-id | default-project-id | default-region | default-zone | send-telemetry)
key the key to get from the config (access-key | secret-key | api-url | insecure | default-organization-id | default-project-id | default-region | default-zone | send-telemetry)

FLAGS:
-h, --help help for get
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ scw autocomplete script [arg=value ...]

| Name | | Description |
|------|---|-------------|
| shell | Default: `/bin/zsh` | |
| shell | Default: `/bin/bash` | |



8 changes: 6 additions & 2 deletions docs/commands/config.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
# Documentation for `scw config`
Config management engine is common across all Scaleway developer tools (CLI, terraform, SDK, ... ). It allows to handle Scaleway config through two ways: environment variables and/or config file.
Default path for configuration file is based on the following priority order:

Scaleway config file is self-documented. We recommend you to have a look at it at least once before using Scaleway developer tools: /Users/sieben/.config/scw/config.yaml
- $SCW_CONFIG_PATH
- $XDG_CONFIG_HOME/scw/config.yaml
- $HOME/.config/scw/config.yaml
- $USERPROFILE/.config/scw/config.yaml

In this CLI, environment variables have priority over the configuration file.

Expand Down Expand Up @@ -63,7 +67,7 @@ scw config get <key ...> [arg=value ...]

| Name | | Description |
|------|---|-------------|
| key | Required<br />One of: `access-key`, `secret-key`, `api-url`, `insecure`, `default-organization-id`, `default-project-id`, `default-region`, `default-zone`, `send-telemetry` | the key to get from the configt |
| key | Required<br />One of: `access-key`, `secret-key`, `api-url`, `insecure`, `default-organization-id`, `default-project-id`, `default-region`, `default-zone`, `send-telemetry` | the key to get from the config |


**Examples:**
Expand Down
Loading