Skip to content

Added a workflow to keep the help output copyright year current - #6266

Open
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:copyright-year-automation
Open

Added a workflow to keep the help output copyright year current#6266
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:copyright-year-automation

Conversation

@nickanderson

@nickanderson nickanderson commented Aug 5, 2026

Copy link
Copy Markdown
Member

This adds a scheduled workflow that does the remembering: on January 2nd it
bumps the CF_COPYRIGHT and opens the pull request.

larsewi
larsewi previously requested changes Aug 5, 2026

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could use date directly in configure.ac similar to BUILD_YEAR?

AC_DEFINE(BUILD_YEAR, esyscmd([date +%Y | tr -d '\n']), "Software build year")
 ---snip---
AC_DEFINE(CF_COPYRIGHT, "2023 Northern.tech AS", "Copyright. To be used in help screens")

Comment thread .github/workflows/copyright_year.yml Outdated
Comment thread .github/workflows/copyright_year.yml Outdated
Comment thread .github/workflows/copyright_year.yml Outdated
@nickanderson

Copy link
Copy Markdown
Member Author

Maybe you could use date directly in configure.ac similar to BUILD_YEAR?

AC_DEFINE(BUILD_YEAR, esyscmd([date +%Y | tr -d '\n']), "Software build year")
 ---snip---
AC_DEFINE(CF_COPYRIGHT, "2023 Northern.tech AS", "Copyright. To be used in help screens")

Yeah, I considered that but I figure that since Herman just updated the string it was desired to have the hard coded date.

@nickanderson
nickanderson force-pushed the copyright-year-automation branch 2 times, most recently from 6d81b55 to 7713a20 Compare August 5, 2026 20:16
@nickanderson
nickanderson requested a review from larsewi August 5, 2026 21:19
@larsewi

larsewi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Let's ask @olehermanse when he is back. If we decide to do this in a workflow. Then I suggest to put all the logic into a shell script and let the workflow take care of only running that script, committing and creating a PR.

A shell script is better because we can run formatters, linters on it. Or simply run it ourselves when debugging

Changelog: none
Signed-off-by: Nick Anderson <nick@cmdln.org>
@nickanderson
nickanderson force-pushed the copyright-year-automation branch from 7713a20 to 266518c Compare August 6, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants