From 0db2d239535219040fe81917c13a7d72697a697f Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:43:53 +0100 Subject: [PATCH] fix[build]: modules detection --- .github/workflows/build.yml | 13 ++++++++----- scripts/get-Packages.pl | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a59d2bc6..7f4d5db1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,7 @@ jobs: install-modules-args: --notest install-modules: PPI Perl::PrereqScanner::NotQuiteLite File::Find::Rule List::MoreUtils + - name: clone 3rdparty repositories at github run: | mapfile -t REPO_URLS < <( scripts/get-FHEMRepositorys.sh | awk '{print $4}' && printf '\0' ) @@ -47,10 +48,13 @@ jobs: cd ./3rdparty printf "%s\n" "${REPO_URLS[@]}" | xargs -I {} -P3 sh -c 'echo "{}: $(basename $(dirname {}))/$(basename {})"; git clone "{}" "$(basename $(dirname {}))/$(basename {})"; ' - - name: create cpanfile from loccal cloned 3rdparty repositories + - name: "create private modules filter regex" + run: | + echo "FHEM_MODULES=$(perl scripts/get-Packages.pl ./3rdparty ./src/fhem/trunk)" >> $GITHUB_ENV + + - name: create cpanfile from local cloned 3rdparty repositories run: | - FHEM_MODULES=$(perl scripts/get-Packages.pl ./3rdparty) - scan-perl-prereqs-nqlite -save_cpanfile -suggests -private_re "^(FHEM::|Win32::|YAF|OW|RTypes|RRDs|SetExtensions|HttpUtils|UPnP::ControlPoint|FritzBoxUtils|configDB|RESIDENTStk|SHC_datafields|TcpServerUtils|Blocking|uConv|ZWLib|UpNp:Common|HttpUtils|Unit|GD|DevIo|AttrTemplate|ProtoThreads|$FHEM_MODULES)" ./3rdparty + scan-perl-prereqs-nqlite -save_cpanfile -suggests -private_re "^(FHEM::|Win32::|YAF$|OW$|RTypes$|RRDs$|SetExtensions$|HttpUtils$|UPnP::ControlPoint$|FritzBoxUtils$|configDB$|RESIDENTStk$|SHC_datafields$|TcpServerUtils$|Blocking$|uConv$|ZWLib$|UpNp:Common|HttpUtils$|Unit$|GD$|DevIo$|AttrTemplate$|ProtoThreads$|$FHEM_MODULES)" ./3rdparty - uses: actions/upload-artifact@v4 with: @@ -60,8 +64,7 @@ jobs: - name: create cpanfile from FHEM dependencies run: | - FHEM_MODULES=$(perl scripts/get-Packages.pl ./src/fhem/trunk) - scan-perl-prereqs-nqlite -save_cpanfile -suggests -private_re "^(FHEM::|Win32::|YAF|OW|RTypes|RRDs|SetExtensions|HttpUtils|UPnP::ControlPoint|FritzBoxUtils|configDB|RESIDENTStk|SHC_datafields|TcpServerUtils|Blocking|uConv|ZWLib|UpNp:Common|HttpUtils|Unit|GD|DevIo|AttrTemplate|ProtoThreads|$FHEM_MODULES)" ./src/fhem/trunk + scan-perl-prereqs-nqlite -save_cpanfile -suggests -private_re "^(FHEM::|Win32::|YAF$|OW$|RTypes$|RRDs$|SetExtensions$|HttpUtils$|UPnP::ControlPoint$|FritzBoxUtils$|configDB$|RESIDENTStk$|SHC_datafields$|TcpServerUtils$|Blocking$|uConv$|ZWLib$|UpNp:Common|HttpUtils$|Unit$|GD$|DevIo$|AttrTemplate$|ProtoThreads$|$FHEM_MODULES)" ./src/fhem/trunk - uses: actions/upload-artifact@v4 with: diff --git a/scripts/get-Packages.pl b/scripts/get-Packages.pl index 0a62761d..e920ded5 100755 --- a/scripts/get-Packages.pl +++ b/scripts/get-Packages.pl @@ -41,8 +41,8 @@ } } # Paketnamen mit | getrennt ausgeben -my $package_string = join '|', @unique_package_names; -print "Eindeutige Paketnamen: $package_string\n"; +my $package_string = join '$|', @unique_package_names; +print "$package_string\$"; # Example: # FHEM_MODULES=$(./scripts/get-Packages.pl src/fhem/trunk/fhem)