forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
codeberg
Source Kind (ocaml#10904)
* Add `codeberg` Source Kind Add a new kind to the `source` stanza for Codeberg projects. Signed-off-by: Nicholas Rodrigues Lordello <[email protected]> * Test Codeberg Not Supported <3.17 Adds additional steps to the Codeberg cram test to check that specifying a Dune-lang prior to 3.17 and using 'codeberg' with the 'source' stanza results in an error. Signed-off-by: Nicholas Rodrigues Lordello <[email protected]> --------- Signed-off-by: Nicholas Rodrigues Lordello <[email protected]>
- Loading branch information
1 parent
241738f
commit 4b982c2
Showing
6 changed files
with
71 additions
and
8 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 `codeberg` as an option for defining project sources in dune-project | ||
files. For example, `(source (codeberg user/repo))`. (#10904, @nlordell) |
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,29 @@ | ||
Test the codeberg source type in project files. | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.17) | ||
> (name foo) | ||
> (generate_opam_files true) | ||
> (source (codeberg john/doe)) | ||
> (package | ||
> (allow_empty) | ||
> (name foo)) | ||
> EOF | ||
|
||
$ dune build | ||
$ cat foo.opam | grep -i codeberg.org | ||
homepage: "https://codeberg.org/john/doe" | ||
bug-reports: "https://codeberg.org/john/doe/issues" | ||
dev-repo: "git+https://codeberg.org/john/doe.git" | ||
|
||
The 'codeberg' source kind is only supported in Dune lang >=3.17; check that | ||
Dune errors as expected with earlier Dune lang versions. | ||
|
||
$ sed -i -e '1s|.*|(lang dune 3.16)|' dune-project | ||
$ dune build | ||
File "dune-project", line 4, characters 8-27: | ||
4 | (source (codeberg john/doe)) | ||
^^^^^^^^^^^^^^^^^^^ | ||
Error: Codeberg is only available since version 3.17 of the dune language. | ||
Please update your dune-project file to have (lang dune 3.17). | ||
[1] |
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