diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 5ab4bb8..3fec92f 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -478,6 +478,8 @@ } void depCallback(ref PackageRecipe p, ref PackageFormat fmt) { + import std.datetime: Clock; + if (m_nonInteractive) return; while (true) { @@ -506,7 +508,8 @@ p.description = input("Description", p.description); p.authors = input("Author name", author).split(",").map!(a => a.strip).array; p.license = input("License", p.license); - p.copyright = input("Copyright string", p.copyright); + string copyrightString = .format("Copyright © %s, %-(%s, %)", Clock.currTime().year, p.authors); + p.copyright = input("Copyright string", copyrightString); while (true) { auto depname = input("Add dependency (leave empty to skip)", null); diff --git a/source/dub/init.d b/source/dub/init.d index 37e474d..36d68bd 100644 --- a/source/dub/init.d +++ b/source/dub/init.d @@ -13,7 +13,6 @@ import dub.recipe.packagerecipe; import dub.dependency; -import std.datetime; import std.exception; import std.file; import std.format; @@ -55,7 +54,6 @@ p.name = root_path.head.toString().toLower(); p.authors ~= username; p.license = "proprietary"; - p.copyright = .format("Copyright © %s, %s", Clock.currTime().year, username); foreach (pack, v; deps) { import std.ascii : isDigit; p.buildSettings.dependencies[pack] = Dependency(v);