Skip to content

Commit

Permalink
fixed script
Browse files Browse the repository at this point in the history
  • Loading branch information
3a4oT committed Mar 5, 2021
1 parent 69e0d96 commit 20fb85f
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 31 deletions.
57 changes: 32 additions & 25 deletions scripts/generate_spm_sources_layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ function generate_ig_list_diff_kit_spm_public_headers() {
echo "Generated under ${SPM_IG_LIST_DIFF_KIT_PUBLIC_HEADERS_PATH}"

public_headers_list=$(
find "Source/IGListDiffKit" -name "*.[h]" \
-type f -not -path "spm/*" \
-not -path "Source/IGListDiffKit/Internal/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g"
find "Source/IGListDiffKit" \
-type f -name "*.[h]" \
-not -path "spm/*" \
-not -path "Source/IGListDiffKit/Internal/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g"
)

SRC_ROOT=$(pwd)
Expand All @@ -46,12 +47,13 @@ function generate_ig_list_diff_kit_spm_public_headers() {
}

function generate_ig_list_diff_kit_spm_private_headers() {
echo "Generate symbolic links for all private headers/implementations *.h && *.m"
echo "Generate symbolic links for all private headers *.h"
echo "Generated under ${SPM_IG_LIST_DIFF_KIT_SOURCES_PATH}"

private_headers_list=$(find "Source/IGListDiffKit/Internal" \
-name "*.h" \
-type f -not -path "spm/*" | sed "s| \([^/]\)|:\1|g")
private_headers_list=$(
find "Source/IGListDiffKit/Internal" \
-type f -name "*.h" \
-not -path "spm/*" | sed "s| \([^/]\)|:\1|g")

SRC_ROOT=$(pwd)
cd $SPM_IG_LIST_DIFF_KIT_SOURCES_PATH
Expand All @@ -70,12 +72,13 @@ function generate_ig_list_diff_kit_spm_private_headers() {
}

function generate_ig_list_diff_kit_spm_sources() {
echo "Generate symbolic links for all public implementtions. *.m"
echo "Generate symbolic links for all public implementtions. *.m & *.mm"
echo "Generated under ${SPM_IG_LIST_DIFF_KIT_SOURCES_PATH}"

sources_list=$(find "Source/IGListDiffKit" \
-name "*.m" \
-type f -not -path "spm/*" | sed "s| \([^/]\)|:\1|g")
sources_list=$(
find "Source/IGListDiffKit" \
-type f -name "*.[m]" -o -name "*.mm" \
-not -path "spm/*" | sed "s| \([^/]\)|:\1|g")

SRC_ROOT=$(pwd)
cd $SPM_IG_LIST_DIFF_KIT_SOURCES_PATH
Expand Down Expand Up @@ -110,8 +113,9 @@ function generate_ig_list_kit_spm_public_headers() {
echo "Generated under ${SPM_IG_LIST_KIT_PUBLIC_HEADERS_PATH}"

public_headers_list=$(
find "Source/IGListKit" -name "*.[h]" \
find "Source/IGListKit" \
\! -name "IGListBindingSingleSectionController.[hm]" \
-name "*.[h]" \
-type f -not -path "spm/*" \
-not -path "Source/IGListKit/Internal/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g"
Expand All @@ -136,13 +140,14 @@ function generate_ig_list_kit_spm_private_headers() {
echo "Generated under ${SPM_IG_LIST_KIT_SOURCES_PATH}"

shared_ig_diff_kit_sorces_list=$(find "Source/IGListDiffKit/Internal" \
-name "*.[hm]" \
-type f -not -path "spm/*" | sed "s| \([^/]\)|:\1|g")
-name "*.[hm]" -o -name "*.mm" \
-type f -not -path "spm/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g")

private_headers_list=$(find "Source/IGListKit/Internal" \
-name "*.h" \
\! -name "IGListBindingSingleSectionController.[hm]" \
-type f -not -path "spm/*" | sed "s| \([^/]\)|:\1|g")
-type f -not -path "spm/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g")

SRC_ROOT=$(pwd)
cd $SPM_IG_LIST_KIT_SOURCES_PATH
Expand Down Expand Up @@ -170,10 +175,12 @@ function generate_ig_list_kit_spm_sources() {
echo "Generate symbolic links for all public implementtions. *.m"
echo "Generated under ${SPM_IG_LIST_KIT_SOURCES_PATH}"

sources_list=$(find "Source/IGListKit" \
-name "*.m" \
sources_list=$(
find "Source/IGListKit" \
\! -name "IGListBindingSingleSectionController.[hm]" \
-type f -not -path "spm/*" | sed "s| \([^/]\)|:\1|g")
-name "*.m" -o -name "*.mm"
-type f -not -path "spm/*" \
-not -path "Examples/*" | sed "s| \([^/]\)|:\1|g")

SRC_ROOT=$(pwd)
cd $SPM_IG_LIST_KIT_SOURCES_PATH
Expand Down Expand Up @@ -201,17 +208,17 @@ function generate_ig_list_kit() {

# Delete all symbolik links from `spm` folder
function cleanup() {
rm -rf $SPM_IG_LIST_DIFF_KIT_PUBLIC_HEADERS_PATH/*.[hm]
rm -rf $SPM_IG_LIST_DIFF_KIT_SOURCES_PATH/*.[hm]
rm -rf $SPM_IG_LIST_DIFF_KIT_PUBLIC_HEADERS_PATH/*.*
rm -rf $SPM_IG_LIST_DIFF_KIT_SOURCES_PATH/*.*
#IGListKit
rm -rf $SPM_IG_LIST_KIT_PUBLIC_HEADERS_PATH/*.[hm]
rm -rf $SPM_IG_LIST_KIT_SOURCES_PATH/*.[hm]
rm -rf $SPM_IG_LIST_KIT_PUBLIC_HEADERS_PATH/*.*
rm -rf $SPM_IG_LIST_KIT_SOURCES_PATH/*.*
}

########## SPM generator pipeline #############
#1
cleanup
#2
generate_ig_list_diff_kit
#3
# #3
generate_ig_list_kit
1 change: 1 addition & 0 deletions spm/Sources/IGListDiffKit/IGListBatchUpdateData.mm
1 change: 1 addition & 0 deletions spm/Sources/IGListDiffKit/IGListDiff.mm
1 change: 1 addition & 0 deletions spm/Sources/IGListKit/IGListCollectionViewLayout.mm
1 change: 0 additions & 1 deletion spm/Sources/IGListKit/IGListExperimentalAdapterUpdater.m

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion spm/Sources/IGListKit/IGListUpdatedObjectContainer.h

This file was deleted.

1 change: 0 additions & 1 deletion spm/Sources/IGListKit/IGListUpdatedObjectContainer.m

This file was deleted.

1 change: 1 addition & 0 deletions spm/Sources/IGListKit/IGListWorkingRangeHandler.mm

This file was deleted.

This file was deleted.

0 comments on commit 20fb85f

Please sign in to comment.