version icon indicating copy to clipboard operation
version copied to clipboard

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

Open wivaku opened this issue 5 years ago • 1 comments

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)?

wivaku avatar Nov 16 '20 13:11 wivaku

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.

asimnaseer avatar Mar 12 '21 18:03 asimnaseer