Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update YYYY in copyright #172

Closed
bdepardo opened this issue Feb 11, 2022 · 3 comments
Closed

Cannot update YYYY in copyright #172

bdepardo opened this issue Feb 11, 2022 · 3 comments

Comments

@bdepardo
Copy link

bdepardo commented Feb 11, 2022

Hi,

I'm trying to use bumpver to update the version of our software, along with updating the copyright year in some files.

I have the following pyproject.toml configuration file

[build-system]
requires = ['setuptools>=40.8.0', 'wheel']
build-backend = 'setuptools.build_meta:__legacy__'


[tool.bumpver]
current_version = "1.2"
version_pattern = "MAJOR.MINOR[-PYTAGNUM]"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
tag = true
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = [
    'current_version = "{version}"',
]
"version" = [
  "{version}"
]
"LICENSE" = [
  "# Copyright (c) 2017-YYYY"
]

I have the following LICENSE file:

################################################################################
# Copyright (c) 2017-2021
# All Rights Reserved
#
# This software is the confidential and proprietary information
# of  ("Confidential Information").
# You shall not disclose such Confidential Information
# and shall use it only in accordance with the terms of
# the license agreement you entered into with UCit.
################################################################################

If I try to run update, the whole line about the copyright disappears, while the other versions are correctly updated:

bumpver update -n -d  --major
INFO    - Old Version: 1.2
INFO    - New Version: 2.0
--- LICENSE
+++ LICENSE
@@ -1,5 +1,5 @@
 ################################################################################
-# Copyright (c) 2017-2021
+
 # All Rights Reserved
 #
 # This software is the confidential and proprietary information
--- pyproject.toml
+++ pyproject.toml
@@ -4,7 +4,7 @@
 [tool.bumpver]
-current_version = "1.2"
+current_version = "2.0"
 version_pattern = "MAJOR.MINOR[-PYTAGNUM]"
 commit_message = "bump version {old_version} -> {new_version}"
 commit = true
--- version
+++ version
@@ -1,2 +1,2 @@
-1.2
+2.0

What am I doing wrong? Is it possible to update both the software version and the copyright year with a single configuration?

Thanks

@mbarkhau
Copy link
Owner

You may well have found an issue here, I'm not sure. I never ran across it since most of my projects have the year as part of the version number. The issue may be, that there is no reference point to start with based on which you could detect the rollover. But I don't see why you would need that. I think it should be possible in principle but I'd have to debug.

@mbarkhau
Copy link
Owner

Fixed with 2022.1115

@bdepardo
Copy link
Author

Thanks. Upgraded to 2022.1115 solved the problem, I was in 2021.1114

mbarkhau added a commit that referenced this issue Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants