Skip to content

Commit d58afe9

Browse files
committed
Added pre-rendered year in LICENSE template
1 parent 94bf67f commit d58afe9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

polymorphine-skeleton

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,9 @@ $app->template('composer.json')->createWith(function (Contents $contents) use ($
6363
return new Template\MergedJsonTemplate($baseTemplate, $contents->package(), $isUpdate);
6464
});
6565

66+
$app->template('LICENSE')->createWith(function (Contents $contents) {
67+
return new Template\BasicTemplate(str_replace('{$tpl.CURRENT_YEAR}', date('Y'), $contents->template()));
68+
});
69+
6670
$exitCode = $app->run($args);
6771
exit($exitCode);

template/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) {original.content} {author.name} <{author.email}>
3+
Copyright (c) {original.content>>>{$tpl.CURRENT_YEAR}<<<original.content} {author.name} <{author.email}>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)