I'm currently building a versioning pipeline that would automatically promote tags based on date. I am able to return all my tags with this command: git for-each-ref --format="%(refname:short) | %(creatordate)" "refs/tags/*"
Which outputs something like this:
v1.0.0 | Mon Jan 24 14:36:19 2022 -0600
v1.1.0 | Mon Jan 24 14:37:06 2022 -0600
v1.1.1 | Mon Jan 24 14:40:39 2022 -0600
v1.1.2 | Tue Jan 25 17:47:32 2022 +0000
v1.1.3 | Tue Jan 25 21:20:03 2022 +0000
v1.1.4 | Tue Jan 25 21:22:40 2022 +0000
v1.2.0 | Tue Jan 25 21:24:08 2022 +0000
v1.3.0 | Tue Jan 25 21:52:28 2022 +0000
I'm looking to take this output and filter it based on current date. So for example if I want all tags created after Jan 24, I'd need to filter this output to only return the tags created from the 25th and beyond.
I'm thinking awk could help with this but I'm uncertain.. Any tips would be great!