Skip to content

Is there any way to filter githubLatestTag? #3161

Answered by halostatue
xfzv asked this question in Q&A
Discussion options

You must be logged in to vote

No, and I’m not sure that there would be an easy way to add one in since there’s no real "lambda" support in Go’s text/template.

You could get something similar with a combination of the output, fromJson, and jq functions with the gh command (you could use curl, too):

chezmoi execute-template '{{ (output "gh" "api" "repos/streetwriters/notesnook/releases" | fromJson | jq "map(select(.tag_name | endswith(\"-android\") | not))[0] | .assets | map(select(.name | contains(\"AppImage\")) | select(.name | contains(\"x86_64\")))" | first | first).browser_download_url }}'

There is no caching with this option, though.

It shouldn’t be hard to add githubTags or githubReleases functions that does cach…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@xfzv
Comment options

@halostatue
Comment options

@halostatue
Comment options

@xfzv
Comment options

@halostatue
Comment options

Answer selected by xfzv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants