mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 13:02:56 +00:00
Add DateTagger for tags like 2021-08-09
This commit is contained in:
@@ -5,6 +5,7 @@ from typing import Optional, List
|
||||
from .taggers import (
|
||||
TaggerInterface,
|
||||
SHATagger,
|
||||
DateTagger,
|
||||
UbuntuVersionTagger,
|
||||
PythonVersionTagger,
|
||||
JupyterNotebookVersionTagger,
|
||||
@@ -39,6 +40,7 @@ ALL_IMAGES = {
|
||||
parent_image=None,
|
||||
taggers=[
|
||||
SHATagger,
|
||||
DateTagger,
|
||||
UbuntuVersionTagger,
|
||||
PythonVersionTagger,
|
||||
JupyterNotebookVersionTagger,
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user