Skip to content

Commit eb83666

Browse files
committed
Various additional replacements during configuration
1 parent 12ba129 commit eb83666

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github: spatie
2-
custom: https://spatie.be/open-source/support-us
1+
github: :vendor_name
2+
custom: :author_homepage

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Security Policy
22

3-
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
3+
If you discover any security related issues, please email :author_email instead of using the issue tracker.

LICENSE.md

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) Spatie bvba <[email protected]>
3+
Copyright (c) :vendor_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

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"name": ":author_name",
1313
"email": ":author_email",
14-
"homepage": "https://spatie.be",
14+
"homepage": ":author_homepage",
1515
"role": "Developer"
1616
}
1717
],
@@ -47,11 +47,11 @@
4747
"funding": [
4848
{
4949
"type": "github",
50-
"url": "https://github.com/sponsors/spatie"
50+
"url": "https://github.com/sponsors/:vendor_name"
5151
},
5252
{
5353
"type": "other",
54-
"url": "https://spatie.be/open-source/support-us"
54+
"url": ":author_homepage"
5555
}
5656
]
5757
}

configure-skeleton.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@ author_name=$(ask_question "Author name" "$git_name")
2525
git_email=$(git config user.email)
2626
author_email=$(ask_question "Author email" "$git_email")
2727

28+
homepage_guess=${echo author_email | awk -F '@' '{print $NF}'//[[:blank:]]/}
29+
author_homepage=$(ask_question "Author homepage" "$homepage_guess")
30+
2831
username_guess=${author_name//[[:blank:]]/}
2932
author_username=$(ask_question "Author username" "$username_guess")
3033

3134
current_directory=$(pwd)
3235
folder_name=$(basename "$current_directory")
3336

34-
vendor_name_unsantized=$(ask_question "Vendor name" "spatie")
37+
vendor_name_unsantized=$(ask_question "Vendor name" "$author_name")
3538
package_name=$(ask_question "Package name" "$folder_name")
36-
package_description=$(ask_question "Package description" "")
39+
package_description=$(ask_question "Package description" "$package_name")
3740

3841
# convert my-class-title to MyClassTitle - RODO: use to subsctitute ./src/*
3942
class_name=$(echo "$package_name" | sed 's/[-_]/ /g' | awk '{for(j=1;j<=NF;j++){ $j=toupper(substr($j,1,1)) substr($j,2) }}1' | sed 's/[[:space:]]//g')
@@ -42,7 +45,7 @@ vendor_name_lower_case=`echo "$vendor_name_unsantized" | tr '[:upper:]' '[:lower
4245
vendor_name="$(tr '[:lower:]' '[:upper:]' <<< ${vendor_name_lower_case:0:1})${vendor_name_lower_case:1}"
4346

4447
echo
45-
echo -e "Author: $author_name ($author_username, $author_email)"
48+
echo -e "Author: $author_name ($author_username, $author_email) - $author_homepage"
4649
echo -e "Package: $package_name <$package_description>"
4750

4851
echo
@@ -61,6 +64,7 @@ for file in $files ; do
6164
sed "s/:author_name/$author_name/g" \
6265
| sed "s/:author_username/$author_username/g" \
6366
| sed "s/:author_email/$author_email/g" \
67+
| sed "s/:author_homepage/$author_homepage/g" \
6468
| sed "s/:package_name/$package_name/g" \
6569
| sed "s/Spatie/$vendor_name/g" \
6670
| sed "s/Skeleton/$class_name/g" \

0 commit comments

Comments
 (0)