Skip to content

Commit 7235659

Browse files
committed
changed news file naming
1 parent 5d6cc82 commit 7235659

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

continuous_delivery_scripts/create_news_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _write_file(file_path: pathlib.Path, text: str) -> None:
6161

6262

6363
def _determine_todays_news_file_name() -> str:
64-
return datetime.now().strftime("%Y%m%d%H%M%S")
64+
return datetime.now().strftime("%Y%m%d%H%M")
6565

6666

6767
def main() -> int:

news/20201130095841.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Changed News files name granularity to the minute rather than second

tests/test_create_news_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_creates_a_file_with_available_file_name_and_returns_its_path(self, _wri
3434
class TestDetermineNewsFilePath(TestCase):
3535
def test_finds_first_available_file_path_in_news_dir(self):
3636
news_dir = configuration.get_value(ConfigurationVariable.NEWS_DIR)
37-
news_file_name_today = datetime.now().strftime("%Y%m%d%H%M%S")
37+
news_file_name_today = datetime.now().strftime("%Y%m%d%H%M")
3838
news_file_path_today = str(pathlib.Path(news_dir, news_file_name_today))
3939

4040
for news_type in NewsType:

0 commit comments

Comments
 (0)