Add DateTagger for tags like 2021-08-09

This commit is contained in:
Erik Sundell
2021-08-09 14:29:43 +02:00
parent 8a94d6f312
commit f2438d3039
2 changed files with 9 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from datetime import datetime
import logging
from .git_helper import GitHelper
from .docker_runner import DockerRunner
@@ -50,6 +51,12 @@ class SHATagger(TaggerInterface):
return GitHelper.commit_hash_tag()
class DateTagger(TaggerInterface):
@staticmethod
def tag_value(container) -> str:
return datetime.utcnow().strftime("%Y-%m-%d")
class UbuntuVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container) -> str: