Skip to content

Commit e1ca577

Browse files
authored
Set current year in generator templates (#8396)
1 parent ede435c commit e1ca577

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

CHANGELOG-developer.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ The list below covers the major changes between 6.3.0 and master only.
4949
- Move filebeat/reader to libbeat/reader {pull}8206[8206]
5050
- Libbeat provides a new function `cmd.GenRootCmdWithSettings` that should be preferred over deprecated functions
5151
`cmd.GenRootCmd`, `cmd.GenRootCmdWithRunFlags`, and `cmd.GenRootCmdWithIndexPrefixWithRunFlags`. {pull}7850[7850]
52+
- Set current year in generator templates. {pull}8396[8396]

generator/beat/{beat}/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017 {full_name}
1+
Copyright (c) {year} {full_name}
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

generator/beat/{beat}/NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{beat}
2-
Copyright 2017 {full_name}
2+
Copyright {year} {full_name}
33

44
This product includes software developed by The Apache Software
55
Foundation (http://www.apache.org/).

generator/metricbeat/{beat}/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017 {full_name}
1+
Copyright (c) {year} {full_name}
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{beat}
2-
Copyright 2017 {full_name}
2+
Copyright {year} {full_name}
33

44
This product includes software developed by The Apache Software
55
Foundation (http://www.apache.org/).

script/generate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import os
21
import argparse
2+
import datetime
3+
import os
34

45
# Creates a new beat or metricbeat based on the given parameters
56

@@ -97,7 +98,8 @@ def replace_variables(content):
9798
.replace("{beat}", beat) \
9899
.replace("{Beat}", beat.capitalize()) \
99100
.replace("{beat_path}", beat_path) \
100-
.replace("{full_name}", full_name)
101+
.replace("{full_name}", full_name) \
102+
.replace("{year}", str(datetime.datetime.now().year))
101103

102104

103105
def get_parser():

0 commit comments

Comments
 (0)