2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-09-19 18:49:01 +00:00

Parse and set short tags from git tag in bake file

This commit is contained in:
Lev Vereshchagin 2021-12-17 12:24:57 +03:00
parent bfbf19058b
commit 47f216af83
2 changed files with 8 additions and 4 deletions

View File

@ -2,5 +2,5 @@
- [ ] Test with helm chart
- [x] Play With Docker generation
- [x] Custom app compose and dockerfile examples
- [ ] Add v13 v12 tags
- [ ] Use &\* feature of yaml to describe backends
- [x] Add v13 v12 tags
- [x] Use &\* feature of yaml to describe backends

View File

@ -43,8 +43,12 @@ group "default" {
function "tag" {
params = [repo, version]
# If `version` parameter is develop (development build) then use tag `latest`
result = ["${version}" == "develop" ? "${USERNAME}/${repo}:latest" : "${USERNAME}/${repo}:${version}"]
result = [
# If `version` param is develop (development build) then use tag `latest`
"${version}" == "develop" ? "${USERNAME}/${repo}:latest" : "${USERNAME}/${repo}:${version}",
# Make short tag for major version if possible. For example, from v13.16.0 make v13.
can(regex("(v[0-9]+)[.]", "${version}")) ? "${USERNAME}/${repo}:${regex("(v[0-9]+)[.]", "${version}")[0]}" : "",
]
}
target "default-args" {