From 63554b181805d823447a0b7a93bccca9c9fa5e64 Mon Sep 17 00:00:00 2001 From: b4b4r07 Date: Mon, 21 Feb 2022 21:09:31 +0900 Subject: [PATCH] Update docs --- docs/configuration/package/gist.md | 10 +++++----- docs/configuration/package/github.md | 9 ++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/configuration/package/gist.md b/docs/configuration/package/gist.md index d4f7318..2021ae4 100644 --- a/docs/configuration/package/gist.md +++ b/docs/configuration/package/gist.md @@ -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 diff --git a/docs/configuration/package/github.md b/docs/configuration/package/github.md index f79312f..1894053 100644 --- a/docs/configuration/package/github.md +++ b/docs/configuration/package/github.md @@ -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. @@ -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`