spapas / python-git-info

A simple project to get information from the git repository of your project
https://pypi.org/project/python-git-info/
MIT License
28 stars 8 forks source link

Git tags missing #12

Closed glensc closed 2 years ago

glensc commented 2 years ago

0 tags

can you create tags, so could know are there any changes since last release, or compare changes between releases.

if you want i may try to figure out hashes of the releases if you are willing to create the tags.

spapas commented 2 years ago

If you can provide a PR with the tags I'll be happy to merge it!

glensc commented 2 years ago

I can't provide PR with tags. come on, you write git low level parser and don't know that? :)

I can provide you git hashes where to create tags at, or repo where you can pull in tags and push to your repo.

spapas commented 2 years ago

I don't use git tags that much, I don't like them :)

If you can provide the hashes I can add the tags to them!

glensc commented 2 years ago

Are you interested of automating the release process via git tags. i.e if you push package is built and uploaded to pip?

something like this:

glensc commented 2 years ago

you should be able to obtain tags:

spapas commented 2 years ago

Thanks I've merged the tags https://github.com/spapas/python-git-info/tags.

The gh action is also interesting to me but I'll need to test it a bit more before integrating it!

Thanks again!

glensc commented 2 years ago

The release automation via git tags push is basically:

  1. use this as base: https://github.com/moogar0880/PyTrakt/pull/179/files
  2. figure out how modify setup.py to take version from environment
  3. update workflow to set version from git tag
  4. don't forget to generate pip token and setup to github actions secret
spapas commented 2 years ago

This must be ok now; thanks for the help

glensc commented 2 years ago

also, if you plan develop that automation yourself, I suggest to use branch so you can add tons of noisy commits, but later squash them to a single commit.

here's another publishing flow that setups the version for build to use:

spapas commented 2 years ago

Thanks! This is a little too complex for my tastes :) Everything needs time to integrate with my project and test and unfortunately I have little spare time :( I'd be happy to merge a PR that works though!

glensc commented 2 years ago

that's why i asked do you want me to submit the pr

glensc commented 2 years ago

You can't mix github releases and git tags, if you use releases you must use them for all tags. otherwise the "latest" will be pointing to a release, not a tag:

you should just delete these two releases:

spapas commented 2 years ago

I deleted the releases instead, is it ok now ?

glensc commented 2 years ago

yes, it doesn't show now 0.7.5 as "latest" anymore