mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02:00
Exclude the build tree from the source package
The .gitignore-derived `build/` pattern does not actually prune the build directory or its contents from the CPack source package, so an empty build/ (and, once docs were built in CI, build/doc-html) leaked into the zip. Ignore the whole build tree in CPACK_SOURCE_IGNORE_FILES.
This commit is contained in:
@@ -76,9 +76,9 @@ jobs:
|
||||
|
||||
- name: Build source zip via CPack
|
||||
id: build
|
||||
# Configure first so the doc target picks up doxygen/mkdocs, build the
|
||||
# docs, then stage the generated site into the source tree so the CPack
|
||||
# source package (which packages the source dir) includes doc-html/.
|
||||
# Build the docs and stage the rendered site at the top level so the
|
||||
# CPack source package includes doc-html/. The build/ tree itself is
|
||||
# excluded by CPACK_SOURCE_IGNORE_FILES.
|
||||
run: |
|
||||
cmake -B build .
|
||||
cmake --build build --target doc
|
||||
|
||||
+3
-1
@@ -582,7 +582,9 @@ if (FMT_MASTER_PROJECT AND EXISTS ${gitignore})
|
||||
string(REPLACE "*" ".*" line "${line}")
|
||||
set(ignored_files ${ignored_files} "${line}$" "${line}/")
|
||||
endforeach ()
|
||||
set(ignored_files ${ignored_files} /.git /build/doxyxml .vagrant)
|
||||
# Exclude the whole build tree: the .gitignore-derived `build/` pattern does
|
||||
# not actually prune the directory or its contents from the source package.
|
||||
set(ignored_files ${ignored_files} /.git "/build($|/)" .vagrant)
|
||||
|
||||
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
|
||||
|
||||
Reference in New Issue
Block a user