antonioribeiro / antonioribeiro/version

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

Open
#92 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
592
Forks
110
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with config/version.yml and the php artisan version:absorb command; trace where GitTagNotFound is raised for git-local and increment modes. Compare the documented modes with the requested manual major/minor/patch plus local commit hash behavior. Done means absorb works without git tags and preserves the requested version fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.