diff --git a/CHANGELOG-developer.asciidoc b/CHANGELOG-developer.asciidoc index 4a068834624..a407e265a4b 100644 --- a/CHANGELOG-developer.asciidoc +++ b/CHANGELOG-developer.asciidoc @@ -47,3 +47,4 @@ The list below covers the major changes between 6.3.0 and master only. - New function `AddTagsWithKey` is added, so `common.MapStr` can be enriched with tags with an arbitrary key. {pull}7991[7991] - Libbeat provides a new function `cmd.GenRootCmdWithSettings` that should be preferred over deprecated functions `cmd.GenRootCmd`, `cmd.GenRootCmdWithRunFlags`, and `cmd.GenRootCmdWithIndexPrefixWithRunFlags`. {pull}7850[7850] +- Set current year in generator templates. {pull}8396[8396] diff --git a/generator/beat/{beat}/LICENSE.txt b/generator/beat/{beat}/LICENSE.txt index a6c296d81a6..3e5c88efac8 100644 --- a/generator/beat/{beat}/LICENSE.txt +++ b/generator/beat/{beat}/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017 {full_name} +Copyright (c) {year} {full_name} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/generator/beat/{beat}/NOTICE.txt b/generator/beat/{beat}/NOTICE.txt index 3898d85d3ba..b10d905153e 100644 --- a/generator/beat/{beat}/NOTICE.txt +++ b/generator/beat/{beat}/NOTICE.txt @@ -1,5 +1,5 @@ {beat} -Copyright 2017 {full_name} +Copyright {year} {full_name} This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/generator/metricbeat/{beat}/LICENSE.txt b/generator/metricbeat/{beat}/LICENSE.txt index a6c296d81a6..3e5c88efac8 100644 --- a/generator/metricbeat/{beat}/LICENSE.txt +++ b/generator/metricbeat/{beat}/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017 {full_name} +Copyright (c) {year} {full_name} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/generator/metricbeat/{beat}/NOTICE.txt b/generator/metricbeat/{beat}/NOTICE.txt index 3898d85d3ba..b10d905153e 100644 --- a/generator/metricbeat/{beat}/NOTICE.txt +++ b/generator/metricbeat/{beat}/NOTICE.txt @@ -1,5 +1,5 @@ {beat} -Copyright 2017 {full_name} +Copyright {year} {full_name} This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/script/generate.py b/script/generate.py index 2d9342ce220..9ffaf778a18 100644 --- a/script/generate.py +++ b/script/generate.py @@ -1,5 +1,6 @@ -import os import argparse +import datetime +import os # Creates a new beat or metricbeat based on the given parameters @@ -97,7 +98,8 @@ def replace_variables(content): .replace("{beat}", beat) \ .replace("{Beat}", beat.capitalize()) \ .replace("{beat_path}", beat_path) \ - .replace("{full_name}", full_name) + .replace("{full_name}", full_name) \ + .replace("{year}", str(datetime.datetime.now().year)) def get_parser():