-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove license files and move to placeholders only
- Loading branch information
Showing
8 changed files
with
6 additions
and
1,064 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,20 @@ | ||
// This example script asks and reacts to the the users selection of license | ||
// This example script asks the users selection of license | ||
|
||
print("Please select *a valid* identifier from <https://github.com/spdx/license-list-data/blob/v3.20/licenses.md>"); | ||
let license = variable::prompt("Which license do you want to use?", | ||
"MPL-2.0", | ||
["MPL-2.0", | ||
"MIT", | ||
"AGPL-3.0", | ||
"Apache-2.0", | ||
"Unlicense", | ||
"Custom", | ||
"(Other)", | ||
"None" | ||
] | ||
); | ||
|
||
if license == "Custom" { | ||
print("You selected to use a *custom* license"); | ||
print("Please *manually* add a correct LICENSE file"); | ||
print("Also update source files *manually* to reference your license choice"); | ||
if license == "(Other)" { | ||
license = variable::prompt("Please define *a valid* identifier from <https://github.com/spdx/license-list-data/blob/v3.20/licenses.md>") | ||
} | ||
|
||
print(`📝 Remeber to add a correct LICENSE file for ${license} - found at <https://github.com/spdx/license-list-data/blob/v3.20/licenses.md> `); | ||
variable::set("license", license); | ||
|
||
if license != "None" { | ||
file::rename(`generate/licenses/${license}`, "LICENSE"); | ||
} | ||
|
||
// Some licenses require a copyright year | ||
// Cargo generate's `authors` is used for owner | ||
let _year = system::date().year; | ||
let year = `${_year}`; | ||
variable::set("year", year); | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.