Skip to content

Commit

Permalink
Update copyright year in LICENSE and __version__.py; add update-copyr…
Browse files Browse the repository at this point in the history
…ight target in Makefile

Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
  • Loading branch information
thombashi committed Dec 31, 2024
1 parent d2add8c commit c86bbd4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Tsuyoshi Hombashi
Copyright (c) 2017-2024 Tsuyoshi Hombashi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
AUTHOR := thombashi
PACKAGE := tabledata
BUILD_WORK_DIR := _work
DOCS_DIR := docs
Expand All @@ -7,12 +6,16 @@ PKG_BUILD_DIR := $(BUILD_WORK_DIR)/$(PACKAGE)

PYTHON := python3

AUTHOR := Tsuyoshi Hombashi
FIRST_RELEASE_YEAR := 2017
LAST_UPDATE_YEAR := $(shell git log -1 --format=%cd --date=format:%Y)


.PHONY: build-remote
build-remote: clean
@mkdir -p $(BUILD_WORK_DIR)
@cd $(BUILD_WORK_DIR) && \
git clone https://github.com/$(AUTHOR)/$(PACKAGE).git --depth 1 && \
git clone https://github.com/thombashi/$(PACKAGE).git --depth 1 && \
cd $(PACKAGE) && \
$(PYTHON) -m tox -e build
ls -lh $(PKG_BUILD_DIR)/dist/*
Expand Down Expand Up @@ -62,3 +65,8 @@ setup-ci:
setup-dev: setup-ci
$(PYTHON) -m pip install -q --disable-pip-version-check --upgrade -e .[test]
$(PYTHON) -m pip check

.PHONY: update-copyright
update-copyright:
sed -i "s/f\"Copyright .*/f\"Copyright $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR), {__author__}\"/" $(PACKAGE)/__version__.py
sed -i "s/^Copyright (c) .* $(AUTHOR)/Copyright (c) $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR) $(AUTHOR)/" LICENSE
2 changes: 1 addition & 1 deletion tabledata/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


__author__: Final = "Tsuyoshi Hombashi"
__copyright__: Final = f"Copyright 2017, {__author__}"
__copyright__: Final = f"Copyright 2017-2024, {__author__}"
__license__: Final = "MIT License"
__version__ = "1.3.3"
__maintainer__: Final = __author__
Expand Down

0 comments on commit c86bbd4

Please sign in to comment.