Skip to content

Commit 509f60c

Browse files
committed
Use rg for source artifact manifest
1 parent fd95c50 commit 509f60c

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/build-nabla.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,24 +299,19 @@ jobs:
299299
tar -cvf "${{ steps.set-prefix.outputs.prefix }}-install.tar" ${{ env.install }}
300300
$sourceTar = "${{ steps.set-prefix.outputs.prefix }}-source.tar"
301301
$sourceList = "${{ steps.set-prefix.outputs.prefix }}-source-files.txt"
302-
$sourcePatterns = @('*.c', '*.cc', '*.cpp', '*.cxx', '*.h', '*.hh', '*.hpp', '*.hxx', '*.inc', '*.inl', '*.ipp', '*.tpp', '*.ixx')
303-
$trackedSourceFiles = @(
304-
git ls-files --recurse-submodules -- $sourcePatterns |
305-
Where-Object { $_ -and $_ -notlike 'examples_tests/media/*' }
306-
)
307-
$generatedSourceFiles = @(
308-
rg --files build-ct `
302+
$sourceFiles = @(
303+
rg --files -uu . `
309304
-g '*.c' -g '*.cc' -g '*.cpp' -g '*.cxx' `
310305
-g '*.h' -g '*.hh' -g '*.hpp' -g '*.hxx' `
311-
-g '*.inc' -g '*.inl' -g '*.ipp' -g '*.tpp' -g '*.ixx'
306+
-g '*.inc' -g '*.inl' -g '*.ipp' -g '*.tpp' -g '*.ixx' `
307+
-g '!examples_tests/media/**' -g '!.git/**'
312308
)
313-
$sourceFiles = @($trackedSourceFiles + $generatedSourceFiles | Sort-Object -Unique)
314309
315310
if ($sourceFiles.Count -eq 0) {
316311
throw "No source-like files found for source artifact packaging."
317312
}
318313
319-
$sourceFiles | Set-Content -Path $sourceList -Encoding utf8
314+
$sourceFiles | Sort-Object -Unique | Set-Content -Path $sourceList -Encoding utf8
320315
tar -cvf $sourceTar -T $sourceList
321316
322317
- name: Upload NSC Godbolt Image artifact

0 commit comments

Comments
 (0)