Skip to content

Commit 8f71e7f

Browse files
committed
Update copyright year in LICENSE and __version__.py; modify Makefile for dynamic year handling
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
1 parent e714ee0 commit 8f71e7f

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Tsuyoshi Hombashi
3+
Copyright (c) 2020-2024 Tsuyoshi Hombashi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
AUTHOR := thombashi
21
PACKAGE := tcolorpy
32

43
BIN_DIR := $(shell pwd)/bin
@@ -8,6 +7,11 @@ PKG_BUILD_DIR := $(BUILD_WORK_DIR)/$(PACKAGE)
87
PYTHON := python3
98
BIN_CHANGELOG_FROM_RELEASE := $(BIN_DIR)/changelog-from-release
109

10+
AUTHOR := Tsuyoshi Hombashi
11+
FIRST_RELEASE_YEAR := 2020
12+
LAST_UPDATE_YEAR := $(shell git log -1 --format=%cd --date=format:%Y)
13+
14+
1115
$(BIN_CHANGELOG_FROM_RELEASE):
1216
GOBIN=$(BIN_DIR) go install github.com/rhysd/changelog-from-release/v3@latest
1317

@@ -20,7 +24,7 @@ build: clean
2024
build-remote: clean
2125
@mkdir -p $(BUILD_WORK_DIR)
2226
@cd $(BUILD_WORK_DIR) && \
23-
git clone https://github.com/$(AUTHOR)/$(PACKAGE).git --depth 1 && \
27+
git clone https://github.com/thombashi/$(PACKAGE).git --depth 1 && \
2428
cd $(PACKAGE) && \
2529
tox -e build
2630
ls -lh $(PKG_BUILD_DIR)/dist/*
@@ -61,3 +65,8 @@ setup-dev: setup-ci
6165
.PHONY: test
6266
test:
6367
$(PYTHON) -m tox -e py
68+
69+
.PHONY: update-copyright
70+
update-copyright:
71+
sed -i "s/^__copyright__ = .*/__copyright__ = f\"Copyright $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR), {__author__}\"/" $(PACKAGE)/__version__.py
72+
sed -i "s/^Copyright (c) .* $(AUTHOR)/Copyright (c) $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR) $(AUTHOR)/" LICENSE

tcolorpy/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "Tsuyoshi Hombashi"
2-
__copyright__ = f"Copyright 2020, {__author__}"
2+
__copyright__ = f"Copyright 2020-2024, {__author__}"
33
__license__ = "MIT License"
44
__version__ = "0.1.6"
55
__maintainer__ = __author__

0 commit comments

Comments
 (0)