phpvms/config/version.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2017-12-16 08:02:35 +08:00
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
2017-12-16 08:02:35 +08:00
build:
2017-12-16 23:27:19 +08:00
mode: number # "number", "git-local" or "git-remote"
number: 451e9e
git_absorb: git-local
#mode: git-local
#length: 6
2017-12-16 08:02:35 +08:00
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 !!!!