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

absorb command cannot auto absorb git timestamp #112

Open
szwss opened this issue Apr 23, 2023 · 0 comments
Open

absorb command cannot auto absorb git timestamp #112

szwss opened this issue Apr 23, 2023 · 0 comments

Comments

@szwss
Copy link

szwss commented Apr 23, 2023

laravel version: 6.20.44
git version: 2.25.1
pragmarx/version: 1.3.1

my config

mode: absorb
blade-directive: version
current:
  label: ''
  major: 1
  minor: 0
  patch: 5
  prerelease: 13-g89a88e67
  buildmetadata: ''
  commit: 89a88e
  timestamp:
    year: 2023
    month: 4
    day: 20
    hour: 17
    minute: 45
    second: 29
    timezone: Asia/Shanghai
commit:
  mode: absorb
  length: 6
  increment-by: 1
git:
  from: local
  commit:
    local: 'git rev-parse --verify HEAD'
    remote: 'git ls-remote {$repository}'
  branch: refs/heads/master
  repository: ''
  version:
    local: 'git describe --tags'
    remote: 'git ls-remote {$repository} | grep tags/ | grep -v {} | cut -d / -f 3 | sort --version-sort | tail -1'
    matcher: '/^(?P<label>[v|V]*[er]*[sion]*)[\.|\s]*(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/'
  timestamp:
    local: 'git show -s --format=%ci'
    remote: 'git show -s --format=%ci origin/master'
format:
  regex:
    optional_bracket: '\[(?P<prefix>.*?)(?P<spaces>\s*)(?P<delimiter>\?\=)(?P<optional>.*?)\]'
  label: '{$label}'
  major: '{$major}'
  minor: '{$minor}'
  patch: '{$patch}'
  prerelease: '{$prerelease}'
  buildmetadata: '{$buildmetadata}'
  commit: '{$commit}'
  version: 'version {$major}.{$minor}.{$patch} (commit {$commit})'
  version-only: 'version {$major}.{$minor}.{$patch}'
  full: '{$version-only}[.?={$prerelease}][+?={$buildmetadata}] (commit {$commit})'
  compact: 'v{$major}.{$minor}.{$patch}-{$commit}'
  timestamp-year: '{$timestamp.year}'
  timestamp-month: '{$timestamp.month}'
  timestamp-day: '{$timestamp.day}'
  timestamp-hour: '{$timestamp.hour}'
  timestamp-minute: '{$timestamp.minute}'
  timestamp-second: '{$timestamp.second}'
  timestamp-timezone: '{$timestamp.timezone}'
  timestamp-datetime: '{$timestamp.year}-{$timestamp.month}-{$timestamp.day} {$timestamp.hour}:{$timestamp.minute}:{$timestamp.second}'
  timestamp-full: '{$timestamp.year}-{$timestamp.month}-{$timestamp.day} {$timestamp.hour}:{$timestamp.minute}:{$timestamp.second} {$timestamp.timezone}'
  wss-custom: '{$major}.{$minor}.{$patch} {$timestamp.year}-{$timestamp.month}-{$timestamp.day}'

When I run php artisan version:absorb
only updated

current:
  label: ''
  major: 1
  minor: 0
  patch: 5
  prerelease: 13-g89a88e67
  buildmetadata: ''
  commit: 89a88e
...

the timestamp part not updated

I don't want to use php artisan version:timestamp,because it updates the timestamp part in the now time,
I want to update time sync git commit simestamp

Am I missing something?

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

1 participant