-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate AuthorName and AuthorEmail in favour of Authors. Authors is a comma-separated list of string. There are no restriction on the format of each string, but we hope that it will follow the NAME <EMAIL> format. If that is the case, many places use regex to get the NAME or EMAIL only and replace the old usage. A side-effect is that emails are optional now. Close #118, #356
- Loading branch information
1 parent
ad5c21c
commit c46df89
Showing
10 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ This command will look around your project path and try to guess some of the ans | |
Currently, we guess: | ||
|
||
- `PackageName` and `PackageUUID` from the `name` and `uuid` fields in `Project.toml`, | ||
- `AuthorName` and `AuthorEmail` from the `authors` field in `Project.toml`, | ||
- `Authors` from the `authors` field in `Project.toml`, | ||
- `PackageOwner` from the `repo` in `docs/make.jl`, | ||
- `JuliaMinVersion` from the `compat` section in `Project.toml`, | ||
- `Indentation` from the `indent` field in `.JuliaFormatter.toml`. | ||
|
@@ -137,7 +137,7 @@ Currently, we guess: | |
If you don't like the result, or want to override the answers, you can run the `apply` function with additional arguments, for instance: | ||
|
||
```julia-repl | ||
julia> data = Dict("AuthorName" => "Bob", "AuthorEmail" => "[email protected]") | ||
julia> data = Dict("Authors" => "Bob <[email protected]>") | ||
julia> BestieTemplate.apply("full/path/to/YourPackage.jl", data) | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,21 @@ module Data | |
using Random: MersenneTwister | ||
using UUIDs: uuid4 | ||
|
||
const deprecated = Dict() | ||
const deprecated = Dict("AuthorName" => "Bestie Template", "AuthorEmail" => "[email protected]") | ||
|
||
const required = merge( | ||
Dict( | ||
"PackageName" => "FakePkg", | ||
"PackageUUID" => string(uuid4(MersenneTwister(123))), | ||
"PackageOwner" => "bestietemplate", | ||
"AuthorName" => "Bestie Template", | ||
"AuthorEmail" => "[email protected]", | ||
), | ||
deprecated, | ||
) | ||
|
||
const strategy_minimum = merge( | ||
required, | ||
Dict( | ||
"Authors" => "Bestie Template <[email protected]> and contributors", # Move to required after 0.11 | ||
"JuliaMinVersion" => "1.6", | ||
"License" => "MIT", | ||
"LicenseCopyrightHolders" => "Bestie Template", | ||
|
@@ -52,7 +51,7 @@ const optional_questions_with_default = Dict( | |
"AddContributionDocs" => true, | ||
"AddAllcontributors" => true, | ||
"AddCodeOfConduct" => true, | ||
"CodeOfConductContact" => strategy_minimum["AuthorEmail"], | ||
"CodeOfConductContact" => split(strategy_minimum["Authors"], ",")[1], | ||
"AddGitHubTemplates" => true, | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters