|
| 1 | +mode: 'absorb' # or 'increment' |
| 2 | +blade-directive: version |
| 3 | +current: |
| 4 | + label: v |
| 5 | + major: 1 |
| 6 | + minor: 0 |
| 7 | + patch: 0 |
| 8 | + prerelease: |
| 9 | + buildmetadata: |
| 10 | + commit: 100001 |
| 11 | + timestamp: |
| 12 | + mode: absorb |
| 13 | + year: |
| 14 | + month: |
| 15 | + day: |
| 16 | + hour: |
| 17 | + minute: |
| 18 | + second: |
| 19 | + timezone: |
| 20 | +commit: |
| 21 | + mode: absorb |
| 22 | + length: 6 |
| 23 | + increment-by: 1 |
| 24 | +git: |
| 25 | + from: 'local' # or "remote" |
| 26 | + commit: |
| 27 | + local: 'git rev-parse --verify HEAD' |
| 28 | + remote: 'git ls-remote {$repository}' |
| 29 | + branch: refs/heads/master |
| 30 | + repository: '' ### you can use config() to get it here: {{ config('version.git.remote.repository') }}. Do not use env() |
| 31 | + version: |
| 32 | + local: 'git describe' |
| 33 | + remote: 'git ls-remote {$repository} | grep tags/ | grep -v {} | cut -d / -f 3 | sort --version-sort | tail -1' |
| 34 | + 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-]+)*))?$/' |
| 35 | + timestamp: |
| 36 | + local: 'git show -s --format=%ci' |
| 37 | + remote: 'git show -s --format=%ci origin/master' ## we will have to find a better way |
| 38 | +format: |
| 39 | + regex: |
| 40 | + optional_bracket: '\[(?P<prefix>.*?)(?P<spaces>\s*)(?P<delimiter>\?\=)(?P<optional>.*?)\]' |
| 41 | + label: "{$label}" |
| 42 | + major: "{$major}" |
| 43 | + minor: "{$minor}" |
| 44 | + patch: "{$patch}" |
| 45 | + prerelease: "{$prerelease}" |
| 46 | + buildmetadata: "{$buildmetadata}" |
| 47 | + commit: "{$commit}" |
| 48 | + version: 'version {$major}.{$minor}.{$patch} (commit {$commit})' |
| 49 | + version-only: 'version {$major}.{$minor}.{$patch}' |
| 50 | + ## Bracket enclosed expressions "[.?{$variable}]" are only rendered if the ?={$variable} is filled |
| 51 | + full: '{$version-only}[.?={$prerelease}][+?={$buildmetadata}] (commit {$commit})' |
| 52 | + compact: "v{$major}.{$minor}.{$patch}-{$commit}" |
| 53 | + timestamp-year: '{$timestamp.year}' |
| 54 | + timestamp-month: '{$timestamp.month}' |
| 55 | + timestamp-day: '{$timestamp.day}' |
| 56 | + timestamp-hour: '{$timestamp.hour}' |
| 57 | + timestamp-minute: '{$timestamp.minute}' |
| 58 | + timestamp-second: '{$timestamp.second}' |
| 59 | + timestamp-timezone: '{$timestamp.timezone}' |
| 60 | + timestamp-datetime: '{$timestamp.year}-{$timestamp.month}-{$timestamp.day} {$timestamp.hour}:{$timestamp.minute}:{$timestamp.second}' |
| 61 | + timestamp-full: '{$timestamp.year}-{$timestamp.month}-{$timestamp.day} {$timestamp.hour}:{$timestamp.minute}:{$timestamp.second} {$timestamp.timezone}' |
| 62 | + ## add as many formats as you need !!!! |
0 commit comments