Skip to content

Commit

Permalink
chore: make test fail if docs is not up to date (#1913)
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored May 19, 2021
1 parent 372d954 commit d8a0253
Show file tree
Hide file tree
Showing 13 changed files with 1,028 additions and 56 deletions.
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

0 comments on commit d8a0253

Please sign in to comment.