Skip to content

Commit

Permalink
allow to use major.minor
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan authored and micbar committed Jun 13, 2024
1 parent 3a9d943 commit babf442
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# NOTE: need to be updated if new production releases are determined
# - follow semver
# - omit 'v' prefix
PRODUCTION_RELEASE_TAGS = ["5.0.0", "5.0.1", "5.0.2", "5.0.3", "7.0.0-rc.1", "7.0.0"]
PRODUCTION_RELEASE_TAGS = ["5.0", "7.0.0"]

# images
ALPINE_GIT = "alpine/git:latest"
Expand Down Expand Up @@ -1281,8 +1281,10 @@ def dockerReleases(ctx):
# production release repo
if ctx.build.event == "tag":
tag = ctx.build.ref.replace("refs/tags/v", "").lower()
if tag in PRODUCTION_RELEASE_TAGS:
docker_repos.append(ctx.repo.slug)
for prod_tag in PRODUCTION_RELEASE_TAGS:
if tag.startswith(prod_tag):
docker_repos.append(ctx.repo.slug)
break

for repo in docker_repos:
if ctx.build.event == "tag":
Expand Down Expand Up @@ -1412,11 +1414,14 @@ def binaryReleases(ctx):
target = "%s/%s/%s" % (target_path, folder, buildref)
targets.append(target)

if buildref in PRODUCTION_RELEASE_TAGS:
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/stable/2.0.0/
folder = "stable"
target = "%s/%s/%s" % (target_path, folder, buildref)
targets.append(target)
for prod_tag in PRODUCTION_RELEASE_TAGS:
if buildref.startswith(prod_tag):
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/stable/2.0.0/
folder = "stable"
target = "%s/%s/%s" % (target_path, folder, buildref)
targets.append(target)
break

else:
targets.append(target)

Expand Down

0 comments on commit babf442

Please sign in to comment.