phpvms/config/version.yml
2017-12-15 18:55:20 -06:00

34 lines
1.1 KiB
YAML

version_source: config # "config", "git-local" or "git-remote"
current:
major: 7
minor: 0
patch: 0
format: "{$major}.{$minor}.{$patch}"
cache:
enabled: true
key: pragmarx-version
time: 60 # minutes = 1 year
build:
#mode: number # "number", "git-local" or "git-remote"
mode: git-local # "number", "git-local" or "git-remote"
length: 6
git:
#git-local: "git rev-parse --verify HEAD"
git-local: "git rev-parse --quiet --verify HEAD 2>/dev/null || echo VERSION"
git-remote: "git ls-remote {$repository}"
branch: "refs/heads/master"
repository: "{{ env('VERSION_GIT_REMOTE_REPOSITORY') }}"
version:
git-local: "git describe"
git-remote: "git ls-remote {$repository} | grep tags/ | grep -v {} | cut -d \/ -f 3 | sort --version-sort | tail -1"
matcher: "/[V|v]*[ersion]*\\s*\\.*(\\d+)\\.(\\d+)\\.(\\d+)\\.*(\\w*)/"
format:
major: "{$major}"
minor: "{$minor}"
patch: "{$patch}"
build: "{$build}"
version: "{$major}.{$minor}.{$patch} (build {$build})"
full: "version {{'format.version'}}"
compact: "v{$major}.{$minor}.{$patch}-{$build}"
## add as many formats as you need !!!!