Cleaner syntax on long line

This commit is contained in:
Lockszmith (@VAST) 2025-04-10 09:56:30 -04:00
parent b2009f3948
commit 555dc04d21
1 changed files with 6 additions and 1 deletions

View File

@ -267,7 +267,12 @@
{{- if and (env "TELEPORT_MAJOR") (not (eq .chezmoi.os "windows")) -}} {{- if and (env "TELEPORT_MAJOR") (not (eq .chezmoi.os "windows")) -}}
{{- with $app_name := "tsh" -}} {{- with $app_name := "tsh" -}}
{{- with $repo := (printf "%s/%s" "gravitational" "teleport") -}} {{- with $repo := (printf "%s/%s" "gravitational" "teleport") -}}
{{- with $version := (gitHubReleases $repo | toJson | fromJson | jq (printf "map(select(.tag_name | startswith(\"v%s\")))[0] | .tag_name" (env "TELEPORT_MAJOR")) | first ) -}} {{- with $version := (gitHubReleases $repo | toJson | fromJson | jq (
printf
"map(select(.tag_name | startswith(\"v%s\")))[0] | .tag_name"
(env "TELEPORT_MAJOR"))
| first
) -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict {{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file" "type" "archive-file"
"url" (printf "https://cdn.teleport.dev/teleport-%s-%s-bin.tar.gz" $version $myArch) "url" (printf "https://cdn.teleport.dev/teleport-%s-%s-bin.tar.gz" $version $myArch)