antonioribeiro / version

Laravel App versioning
MIT License
587 stars 104 forks source link

version:absorb to show local git commit hash (when git describe is empty)? #92

Open wivaku opened 4 years ago

wivaku commented 4 years ago

What I would like to achieve:

In my environment I don't have git versions / tags

$ git describe
fatal: No names found, cannot describe anything.

I created the default config/version.yml and when running php artisan version:absorb I get the Exception GitTagNotFound.

I tried changing the commit mode as shown in the documentation:

commit:
    mode: git-local

php artisan version:absorb still results in Exception GitTagNotFound Same when changing mode to increment.

How do I achieve this (manually maintain major/minor/patch and get commit from local git commit)?

asimnaseer commented 3 years ago

Create a tag for the current git commits using git tag -a -m <message> <tag_name>. After this when you run git describe it will out the current tag and commit.