-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* copy_files: add test to show behavior with build files Signed-off-by: Javier Chávarri <[email protected]> * add copy_files_src stanza Signed-off-by: Javier Chávarri <[email protected]> * format Signed-off-by: Javier Chávarri <[email protected]> * copy_files: add only_sources field Signed-off-by: Javier Chávarri <[email protected]> * copy_files: guard new field against version check Signed-off-by: Javier Chávarri <[email protected]> * copy_files: don't rely on library for the test Signed-off-by: Javier Chávarri <[email protected]> * add changelog + docs Signed-off-by: Javier Chávarri <[email protected]> * rename only_sources to sources Signed-off-by: Javier Chávarri <[email protected]> * simpler test Signed-off-by: Javier Chávarri <[email protected]> * format Signed-off-by: Javier Chávarri <[email protected]> * replace sources bool with variant Signed-off-by: Javier Chávarri <[email protected]> * Revert "rename only_sources to sources" This reverts commit dd2bd16. Signed-off-by: Javier Chávarri <[email protected]> * format Signed-off-by: Javier Chávarri <[email protected]> * Allow blang expressions Signed-off-by: Etienne Millon <[email protected]> --------- Signed-off-by: Javier Chávarri <[email protected]> Signed-off-by: Etienne Millon <[email protected]> Co-authored-by: Etienne Millon <[email protected]>
- Loading branch information
Showing
6 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- add `only_sources` field to `copy_files` stanza (#9827, fixes #9709, | ||
@jchavarri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Show that copy_files operates on the build folder | ||
|
||
$ mkdir -p target foo | ||
$ cat >dune-project <<EOF | ||
> (lang dune 3.14) | ||
> EOF | ||
$ cat >target/dune <<EOF | ||
> (copy_files | ||
> (files ../foo/*.txt)) | ||
> EOF | ||
$ cat >foo/dune <<EOF | ||
> (rule | ||
> (write-file in-build.txt "")) | ||
> EOF | ||
|
||
$ touch foo/in-source.txt | ||
|
||
$ dune build target/in-source.txt | ||
$ dune build target/in-build.txt | ||
|
||
Show the difference when `only_sources` is used | ||
|
||
$ cat >target/dune <<EOF | ||
> (copy_files | ||
> (only_sources) | ||
> (files ../foo/*.txt)) | ||
> EOF | ||
|
||
$ dune build target/in-source.txt | ||
$ dune build target/in-build.txt | ||
Error: Don't know how to build target/in-build.txt | ||
[1] | ||
|
||
A blang expression can be used: | ||
|
||
$ cat >target/dune <<EOF | ||
> (copy_files | ||
> (only_sources (= x x)) | ||
> (files ../foo/*.txt)) | ||
> EOF | ||
|
||
$ dune build target/in-source.txt | ||
$ dune build target/in-build.txt | ||
Error: Don't know how to build target/in-build.txt | ||
[1] |