franiglesias / versiontag

Bash command to automate tag semantic versioning
MIT License
46 stars 13 forks source link

Source of truth for versiontag #4

Open franiglesias opened 5 years ago

franiglesias commented 5 years ago

Given since 1.4.1 we support writing of .semver file, I'm thinking what source of truth should we use to detect last version.

pkristian commented 5 years ago

i am thinging about something like git tag -l | sort | grep

franiglesias commented 5 years ago

A critical thing here is to ensure we access to the last tag. For tagging, at my job, we usually perform a git pull --tags to bring tags in the shared repose we can look for the last and then tag last commit as required.

pkristian commented 5 years ago

i am thinking about it.. but i have a few questions:

  1. are we considering and making only stable versions (v1.2.3) or even unstable? (v1.2.3-RC3) See #7
  2. what about different sets of versions: for example there is one package in more versions lets say:
    • v2.3.0 and v2.4.0, and you want to create patch v2.3.1 See #8
  3. sometimes pull dont have to be best option. i mean, i thnk it fill be nice to vanilla command to do less stuff. because when tool become too much opinioned, you are enforcing one use case.

idea: getting tags from git list, this way you will:

franiglesias commented 5 years ago

I've created some new issues to better discuss this questions. See #7 and #8

franiglesias commented 5 years ago

I'm experimenting with this snippet to get the latest version from tags. A good thing is that It allows to discriminate between version tagging and other types of tags. I think it needs better sorting.

git tag | sort -r | grep "^v[0-9]*\.[0-9]*\.[0-9]" | head -1
franiglesias commented 5 years ago

sometimes pull dont have to be best option. i mean, i thnk it fill be nice to vanilla command to do less stuff. because when tool become too much opinioned, you are enforcing one use case.

Yes. I agree.