Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wivaku opened this issue Nov 16, 2020 · 1 comment

Comments

@wivaku
Copy link

wivaku commented Nov 16, 2020

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

@asimnaseer
Copy link

asimnaseer commented Mar 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants