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
|
2017-12-16 08:55:20 +08:00
|
|
|
time: 60 # minutes = 1 year
|
2017-12-16 08:02:35 +08:00
|
|
|
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 !!!!
|