Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blog post Simple versioning with git tags #197

Merged
merged 4 commits into from
May 9, 2024

Conversation

grihabor
Copy link
Contributor

No description provided.

- [Using env vars to include dynamic data in tags](../../docs/docs/docker/tagging-docker-images.mdx#using-env-vars-to-include-dynamic-data-in-tags)

To make it work we need one more pants feature [hidden in the
docs](../../docs/docs/using-pants/key-concepts/options.mdx#pantsbootstrap-file)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this link will work

@benjyw
Copy link
Contributor

benjyw commented Apr 27, 2024

Thanks @grihabor , this is great! Do you mind if I tweak it a bit?

@grihabor
Copy link
Contributor Author

Do you mind if I tweak it a bit?

Go ahead, I don't mind :)

Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a suggestion for an edit to the first part. It needs editing to merge in the links and so on, so I wouldn't accept the suggestion, but use it as the basis for your own edit?


# Simple versioning with git tags

How do I set a docker image version based on git tag? Or python distribution
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something like:

Suggested change
How do I set a docker image version based on git tag? Or python distribution
A frequently asked question on [Pants Slack](/community/getting-help) is how to set a version - such as for a docker image, helm chart or Python distribution - based on git state.
Pants does have various solutions for this, but they tend to be too complicated, or too limited:
... list of links ...
I recently came up with a useful hack that solves this problem in a novel way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit different style, but ok :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit different style, but ok :)

Yeah, just wanted to keep it a bit more positive :)

Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@benjyw
Copy link
Contributor

benjyw commented May 9, 2024

Not sure what the deal is with the CI failure, I will investigate.

@grihabor
Copy link
Contributor Author

grihabor commented May 9, 2024

Yeah, looks good now

@benjyw
Copy link
Contributor

benjyw commented May 9, 2024

Yeah, looks good now

Probably just had to merge main into the branch.

@benjyw benjyw merged commit 15a5f5d into pantsbuild:main May 9, 2024
1 check passed
@grihabor
Copy link
Contributor Author

grihabor commented May 9, 2024

@grihabor
Copy link
Contributor Author

grihabor commented May 9, 2024

here is the fix #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants