Skip to content

Commit 49d8a7d

Browse files
authored
Merge pull request #33 from gregkos/patch-2
Replace leftover Spatie references during configure-skeleton
2 parents 7ec4637 + d4c3314 commit 49d8a7d

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@ 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_temp=$(echo $author_email | awk -F '@' '{print $NF}')
29+
homepage_guess=${homepage_temp//[[:blank:]]/}
30+
author_homepage=$(ask_question "Author homepage" "$homepage_guess")
31+
2832
username_guess=${author_name//[[:blank:]]/}
2933
author_username=$(ask_question "Author username" "$username_guess")
3034

3135
current_directory=$(pwd)
3236
folder_name=$(basename "$current_directory")
3337

34-
vendor_name_unsantized=$(ask_question "Vendor name" "spatie")
38+
vendor_name_unsantized=$(ask_question "Vendor name" "$author_name")
3539
package_name=$(ask_question "Package name" "$folder_name")
36-
package_description=$(ask_question "Package description" "")
40+
package_description=$(ask_question "Package description" "$package_name")
3741

3842
# convert my-class-title to MyClassTitle - RODO: use to subsctitute ./src/*
3943
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 +46,7 @@ vendor_name_lower_case=`echo "$vendor_name_unsantized" | tr '[:upper:]' '[:lower
4246
vendor_name="$(tr '[:lower:]' '[:upper:]' <<< ${vendor_name_lower_case:0:1})${vendor_name_lower_case:1}"
4347

4448
echo
45-
echo -e "Author: $author_name ($author_username, $author_email)"
49+
echo -e "Author: $author_name ($author_username, $author_email) - $author_homepage"
4650
echo -e "Package: $package_name <$package_description>"
4751

4852
echo
@@ -61,6 +65,7 @@ for file in $files ; do
6165
sed "s/:author_name/$author_name/g" \
6266
| sed "s/:author_username/$author_username/g" \
6367
| sed "s/:author_email/$author_email/g" \
68+
| sed "s/:author_homepage/$author_homepage/g" \
6469
| sed "s/:package_name/$package_name/g" \
6570
| sed "s/Spatie/$vendor_name/g" \
6671
| sed "s/Skeleton/$class_name/g" \

0 commit comments

Comments
 (0)