Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Feb 21, 2022
1 parent 9678c80 commit 63554b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docs/configuration/package/gist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Gist type allows you to manage [Gist](https://gist.github.com/) pages as a plugi

```yaml
gist:
- name: hoge.sh
description: this is a test for gist
- name: context-scripts
description: Get current GCP/Kubernetes context which you are on.
owner: b4b4r07
id: f26dd264f094e0ca834ce9feadc0c3f1
id: bb820b99fdba605ea4bd4fb29046ce58
command:
link:
- from: hoge.sh
to: hoge
- from: gcp-context
- from: kube-context
```
## Parameters
Expand Down
9 changes: 8 additions & 1 deletion docs/configuration/package/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Allows you to specify a filename of GitHub Release asset you want to install. Mo

!!! tip "(Basically) NO NEED TO SET THIS"

Basically in afx, it's no problem even if you don't specify this field when downloading a package from GitHub Release. Because afx automatically filters release assets that can work on your system (OS/Architecture, etc)even if several release assets are uploaded.
Basically in afx, it's no problem even if you don't specify this field when downloading a package from GitHub Release. Because afx automatically filters release assets that can work on your system (OS/Architecture, etc) even if several release assets are uploaded.

But the filename of the package uploaded to GitHub Release can be named by its author freely. So there are cases that afx cannot filter the package which is suitable on your system when too much special wording is included in a filename.

Expand Down Expand Up @@ -176,6 +176,13 @@ map | `{}`

Allows you to replace pre-defined OS/Architecture wording with yours. In afx, the templating variables of `.OS` and `.Arch` are coming from `runtime.GOOS` and `runtime.GOARCH` (The Go Programming Language). For example, your system is Mac: In this case, `GOOS` returns `darwin` string, but let's say the filename of the assets on GitHub Release you want has `mac` instead of `darwin`. In this case, you can replace it with `darwin` by defining this `replacements` map.

```yaml hl_lines="4"
asset:
filename: '{{ .Release.Name }}-{{ .Release.Tag }}-{{ .Arch }}-{{ .OS }}.tar.gz'
replacements:
darwin: mac
```
Keys should be valid `GOOS`s or `GOARCH`s. Valid name is below (full is are on [Environment - The Go Programming Language](https://go.dev/doc/install/source#environment)). Values are the respective replacements.

`GOOS` | `GOARCH`
Expand Down

0 comments on commit 63554b1

Please sign in to comment.