polylith

timo 2024-09-26T08:52:01.624099Z

Hi, I am tagging my releases with stable-main and v1.0.xxx and I have this config in my workspace.edn

:tag-patterns {:stable "stable-*"
                :release "v[0-9]*"}
But somehow poly info always shows me stable since the initial commit of the repo... What am I doing wrong?

timo 2024-09-26T09:12:16.166079Z

git log shows this e61a375 (tag: refs/tags/v1.0.268, tag: refs/tags/stable-main) [skip ci] Updating version and poly info shows this stable since: 9671a02

Sam H 2024-09-26T10:47:40.750779Z

How are you tagging the stable-main? I had a similar issue but it was due to the CI/CD run doing the update of stable-main tag and my local checkout not having it

git fetch --tags --force
would update the stable-main tag with the correct sha. Do you see the same issue when you do a fresh checkout?

timo 2024-09-26T10:50:47.123609Z

I did that and as above mentioned on my local machine the git log shows the tags but poly info shows stable since a different commit

Sam H 2024-09-26T10:51:44.455869Z

same issue with a fresh checkout?

timo 2024-09-26T10:53:09.043549Z

yeah unfortunately all the same

tengstrand 2024-09-26T11:30:47.124669Z

Internally, the poly tool executes git log --pretty=format:'%H %d'. It picks the newest tag that matches any of the tag patterns specified in workspace.edn. Nice to meet you at the Heart of Clojure by the way @timok! If you can't get it to work, please send me the output of that git command, and the content of :tag-patterns , and I can have a look.

👋 1
timo 2024-09-26T12:19:32.566069Z

that's interesting, so it has to be a tag object and can not be a 'lightweight' tag. indeed @tengstrand your command does not show my tags.

timo 2024-09-26T12:20:09.903569Z

I actually didn't know that it is not sufficient to just git tag -m but one has to git tag -a -m

tengstrand 2024-09-26T13:03:36.924559Z

Okay, so problem solved?

timo 2024-09-26T13:06:18.796669Z

solved (at least I think so)

👍 1