Skip to content

Commit

Permalink
Set current year in generator templates (#8396) (#8414)
Browse files Browse the repository at this point in the history
(cherry picked from commit e1ca577)
  • Loading branch information
jsoriano committed Oct 1, 2018
1 parent 09bfe35 commit b22b323
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-developer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 1 addition & 1 deletion generator/beat/{beat}/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion generator/beat/{beat}/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -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/).
2 changes: 1 addition & 1 deletion generator/metricbeat/{beat}/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion generator/metricbeat/{beat}/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -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/).
6 changes: 4 additions & 2 deletions script/generate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import argparse
import datetime
import os

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

Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit b22b323

Please sign in to comment.