Template String
Some fields are parsed with Go's text/template and sprig.
caution
The following sprig functions are removed for security reason.
Common Template Functions
trimV: This is equivalent totrimPrefix "v"
Template Variables
OS: A string whichGOOSis replaced byreplacements. Ifreplacementsisn't set,OSis equal toGOOS. Basically you should useOSfor the consistencyArch: A string whichGOARCHis replaced byreplacements. Ifreplacementsisn't set,Archis equal toGOARCH. Basically you should useOSfor the consistencyGOOS: Go's runtime.GOOSGOARCH: Go's runtime.GOARCHVersion: PackageversionSemVer: Package version that version_prefix is trimmed fromVersion. For example, ifVersioniscli/v1.0.0andversion_prefixiscli/, thenSemVerisv1.0.0Format: PackageformatFileName:files[].nameAssetWithoutExt
AssetWithoutExt
AssetWithoutExt is a string that a file extension is removed from Asset.
e.g.
asset: aks-engine-{{.Version}}-{{.OS}}-{{.Arch}}.tar.gz
files:
- name: aks-engine
src: "{{.AssetWithoutExt}}/aks-engine" # "{{.AssetWithoutExt}}" == "aks-engine-{{.Version}}-{{.OS}}-{{.Arch}}"
Omit Format in asset and url
The file extension is complemented if it isn't included in asset and url.
e.g.
asset: foo # This is same with `foo.tar.gz` and `foo.{{.Format}}`
format: tar.gz
You can unify the setting of raw format and non raw format.
Before
asset: kalker-{{.OS}}.{{.Format}}
format: zip
overrides:
- goos: linux
format: raw
asset: kalker-{{.OS}}
After
asset: kalker-{{.OS}}
format: zip
overrides:
- goos: linux
format: raw
You can disable the complementation by setting append_ext: false.
append_ext: false
By default append_ext is true.