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

Cherry-pick #8396 to 6.x: Set current year in generator templates #8414

Merged
merged 1 commit into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-developer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,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