You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to generate a sort of semantic version using the following scheme: tag is major.minor and use number of commits on top of tag as patch part of sem ver.
fatal: ambiguous argument '<no value>..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
task: Command "git rev-list '<no value>'.. --count" in taskvars file failed: exit status 128
That's because the iteration (expansion) of merge doesn't respect variables resolved in the same expansion cycle because templater doesn't reset its a sort of cache:
Hi
I wanted to generate a sort of semantic version using the following scheme: tag is
major.minor
and use number of commits on top of tag aspatch
part of sem ver.So I did something like this:
But this taskfile will generate an error
That's because the iteration (expansion) of
merge
doesn't respect variables resolved in the same expansion cycle because templater doesn't reset its a sort of cache:merge cycle:
https://github.com/go-task/task/blob/master/internal/compiler/v2/compiler_v2.go#L55-L73
here
strMap
is like a cache which is never resetedhttps://github.com/go-task/task/blob/master/internal/templater/templater.go#L32-L34
Is there any workaround for it except these two:
git rev-list $(git describe --tags --abbrev=0).. --count
because it meansgit describe
is called two times (one fortag
)git rev-list '{{.tag}}'.. --count || true
The text was updated successfully, but these errors were encountered: