version
version copied to clipboard
version:absorb to show local git commit hash (when git describe is empty)?
What I would like to achieve:
- manually maintain major/minor/patch and timestamp
- get commit hash from git
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)?
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.