Skip to content

Commit

Permalink
Merge pull request #208 from lefessan/z-2023-04-24-headers-and-create
Browse files Browse the repository at this point in the history
Update headers and add creation phase
  • Loading branch information
lefessan authored Apr 27, 2023
2 parents 5391db7 + 66be684 commit 3a349aa
Show file tree
Hide file tree
Showing 82 changed files with 430 additions and 292 deletions.
31 changes: 13 additions & 18 deletions .drom
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version:0.9.0

# hash of toml configuration files
# used for generation of all files
b972ffcc86c9fb8b7363c5a468c6dcc3:.
6f93b9b249b9706a653351f9bf7f2764:.
# end context for .

# begin context for .github/workflows/workflow.yml
Expand Down Expand Up @@ -40,7 +40,7 @@ b972ffcc86c9fb8b7363c5a468c6dcc3:.

# begin context for LICENSE.md
# file LICENSE.md
5b3e28aaa11021fe68685f6bdc154505:LICENSE.md
e31b19b601ab25353ef16d67127735f1:LICENSE.md
# end context for LICENSE.md

# begin context for Makefile
Expand Down Expand Up @@ -70,7 +70,7 @@ e739f3026aa997af4026bc428f4c9ef6:docs/favicon.png

# begin context for docs/index.html
# file docs/index.html
8ac459aeb72291df9455023e853509da:docs/index.html
22b71a663d67a978f041eb1e6eb85e26:docs/index.html
# end context for docs/index.html

# begin context for docs/sphinx/index.html
Expand All @@ -90,7 +90,7 @@ c8281f46ba9a11d0b61bc8ef67eaa357:docs/style.css

# begin context for drom.toml
# file drom.toml
800217989c2927eba8feb4b5129d1433:drom.toml
b7b7b8f4a370e3c1b425b7a9316c3e0f:drom.toml
# end context for drom.toml

# begin context for dune
Expand All @@ -100,27 +100,22 @@ e850a13c004f963e9f5a568eac93c217:dune

# begin context for dune-project
# file dune-project
8881cf025649e37ebb711ed8dde815df:dune-project
ef11813030a7a485db7aeac417925033:dune-project
# end context for dune-project

# begin context for dune_
# file dune_
e850a13c004f963e9f5a568eac93c217:dune_
# end context for dune_

# begin context for opam/drom.opam
# file opam/drom.opam
ec1fe43ed091a01afee75c83d6099a81:opam/drom.opam
26ed2b90335a3336f17264c5159f73c8:opam/drom.opam
# end context for opam/drom.opam

# begin context for opam/drom_lib.opam
# file opam/drom_lib.opam
a500ced7476ec1f1452c336dd0810545:opam/drom_lib.opam
aebe634fcda0c9b568e4becec97db6e7:opam/drom_lib.opam
# end context for opam/drom_lib.opam

# begin context for opam/drom_toml.opam
# file opam/drom_toml.opam
620e90e1005f0bce6b93aa2374c5fd5c:opam/drom_toml.opam
7b1dd39dd0f5668232a6f436c20d27a8:opam/drom_toml.opam
# end context for opam/drom_toml.opam

# begin context for scripts/after.sh
Expand Down Expand Up @@ -155,7 +150,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst

# begin context for sphinx/conf.py
# file sphinx/conf.py
dc4cee7810778bedcd7b9bfa95338ac4:sphinx/conf.py
67496ee935ab27fdabb4544f4f81eeb6:sphinx/conf.py
# end context for sphinx/conf.py

# begin context for sphinx/index.rst
Expand All @@ -170,7 +165,7 @@ dc4cee7810778bedcd7b9bfa95338ac4:sphinx/conf.py

# begin context for sphinx/license.rst
# file sphinx/license.rst
48beb00972c1154a983b98085559f8ce:sphinx/license.rst
7f09d28eb87ab9f2650899f85835e74a:sphinx/license.rst
# end context for sphinx/license.rst

# begin context for src/drom/dune
Expand All @@ -185,7 +180,7 @@ efad88968955023a354f16469eb1ae15:src/drom/dune

# begin context for src/drom/linking_flags.sh
# file src/drom/linking_flags.sh
0a2fe9095ac85798a954cea4a04944b7:src/drom/linking_flags.sh
9a3b02ff1d99723e9ee2f3c0e97d7b30:src/drom/linking_flags.sh
# end context for src/drom/linking_flags.sh

# begin context for src/drom/main.ml
Expand Down Expand Up @@ -215,7 +210,7 @@ e7ddb8c3da7d7b47c8100964303ba50a:src/drom_lib/dune

# begin context for src/drom_lib/version.mlt
# file src/drom_lib/version.mlt
fde618924d2a7c6f9aeb7cd45b31b84c:src/drom_lib/version.mlt
abcd112b76fdd31f509bb6e3402f1a11:src/drom_lib/version.mlt
# end context for src/drom_lib/version.mlt

# begin context for src/toml.7.1.0/dune
Expand All @@ -240,7 +235,7 @@ d1b05207fce876a1b44a8b268bcaf226:src/toml.7.1.0/index.mld

# begin context for src/toml.7.1.0/version.mlt
# file src/toml.7.1.0/version.mlt
fde618924d2a7c6f9aeb7cd45b31b84c:src/toml.7.1.0/version.mlt
abcd112b76fdd31f509bb6e3402f1a11:src/toml.7.1.0/version.mlt
# end context for src/toml.7.1.0/version.mlt

# begin context for test/expect-tests/dune
Expand Down
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@

## v0.9.2
* Two-phase project creation: projects starts in a creation phase
(option `create` set to true in `drom.toml`) after `project new`,
where more files are updated when `drom.toml` is modified. Creation
phase must be ended by `drom project --create false`, after which
fewer files are updated (useful to create the project and edit
synopsis/description before freezing them). Only for skeletons
with DROM_VERSION > 0.9.2~dev2.
* Support for inline templates:
* If `path/file.ext` is to be generated, `drom` will check if
`path/file.ext.drom-tpl` exists, in which case it will use it as
a template for the file. It is possible to use
`_drom/skeleton/path/file.ext` as an example to create such a file.

## v0.9.1
* Fix Sys_error docs/style.css because of missing file
* Fix non-working removal of files (deprecated opam files for example)

## v0.9.0
* Split `drom-share` into another repository:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 OCamlPro SAS & Origin Labs SAS
Copyright (c) 2023 OCamlPro SAS

This software is distributed under the terms of the
GNU Lesser General Public License (LGPL) version 2.1 (included below).
Expand Down
11 changes: 5 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ <h1>drom</h1>
<li><a href="https://github.com/ocamlpro/drom/issues">Bug reports</a></li>
</ul>
<p>Authors:</p>
<ul> <li><p>Fabrice Le Fessant &lt;fabrice.le_fessant&commat;origin-labs.com&gt;</p></li>
<ul> <li><p>Fabrice Le Fessant &lt;fabrice.le_fessant&commat;ocamlpro.com&gt;</p></li>
<li><p>Léo Andrès &lt;leo.andres&commat;ocamlpro.com&gt;</p></li></ul>
</div>
<div class="section">
<h2 id="Simple-Example">Simple Example</h2>

<h2 id="simple-example">Simple Example</h2>
<p>You can create a new OCaml project with:</p>
<pre><code>$ drom new my-client --skeleton mini_prg
Creating project &quot;my-client&quot; with skeleton &quot;mini_prg&quot;, license &quot;LGPL2&quot;
Expand Down Expand Up @@ -66,15 +65,15 @@ <h2 id="Simple-Example">Simple Example</h2>
├── dune
├── main.ml
├── package.toml &lt;────────── package config EDIT !
└── version.mlt</code></pre>

└── version.mlt
</code></pre>
<p>This project uses the minimalist <code>mini_prg</code> skeleton, but other skeletons
like <code>program</code> or <code>library</code> have more files.</p>

</div>
<div class="trailer">
<hr/>
<p>Copyright © OCamlPro SAS & Origin Labs SAS</p>
<p>Copyright © OCamlPro SAS</p>
</div>
</div>
</body>
Expand Down
14 changes: 8 additions & 6 deletions drom.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
[project]
create-project = false
drom-version = "0.1"
share-repo = "https://github.com/OCamlPro/drom-share"
share-version = "0.9.0"

[project]
authors = ["Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>", "Léo Andrès <[email protected]>"]
authors = ["Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>", "Léo Andrès <[email protected]>"]
ci-systems = ["ubuntu-latest", "macos-latest", "windows-latest"]
copyright = "OCamlPro SAS & Origin Labs SAS"
copyright = "OCamlPro SAS"
edition = "4.10.0"
github-organization = "ocamlpro"
license = "LGPL2"
min-edition = "4.07.0"
name = "drom"
skeleton = "program"
synopsis = "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
version = "0.9.1"
version = "0.9.2~dev2"

# keys that you could also define:
# odoc-target = "...odoc-target..."
Expand All @@ -27,7 +28,8 @@ version = "0.9.1"
# homepage = "...homepage..."

[project]
description = """The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like
description = """
The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like
user experience. It can be used to create full OCaml projects with
sphinx and odoc documentation. It has specific knowledge of Github and
will generate files for Github Actions CI and Github pages.
Expand Down Expand Up @@ -77,7 +79,7 @@ ocaml-flags = "-w -a"
# dot-gitignore-trailer = "..."
[fields]
dune-lang = "2.1"
readme-trailer = '''
readme-trailer = """
## Simple Example
Expand Down Expand Up @@ -121,7 +123,7 @@ Using skeleton "program" for package "my-client"
This project uses the minimalist `mini_prg` skeleton, but other skeletons
like `program` or `library` have more files.
'''
"""

[[package]]
dir = "src/drom"
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(name drom)
(allow_approximate_merlin)
(generate_opam_files false)
(version 0.9.1)
(version 0.9.2~dev2)
(formatting (enabled_for ocaml reason))
(using menhir 2.0)

Expand Down
13 changes: 0 additions & 13 deletions dune_

This file was deleted.

6 changes: 3 additions & 3 deletions opam/drom.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "drom"
version: "0.9.1"
version: "0.9.2~dev2"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis:
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
Expand All @@ -13,11 +13,11 @@ sphinx and odoc documentation. It has specific knowledge of Github and
will generate files for Github Actions CI and Github pages.
"""
authors: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
maintainer: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
homepage: "https://ocamlpro.github.io/drom"
Expand Down
6 changes: 3 additions & 3 deletions opam/drom_lib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "drom_lib"
version: "0.9.1"
version: "0.9.2~dev2"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis:
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
Expand All @@ -13,11 +13,11 @@ sphinx and odoc documentation. It has specific knowledge of Github and
will generate files for Github Actions CI and Github pages.
"""
authors: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
maintainer: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
homepage: "https://ocamlpro.github.io/drom"
Expand Down
6 changes: 3 additions & 3 deletions opam/drom_toml.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "drom_toml"
version: "0.9.1"
version: "0.9.2~dev2"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis:
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
Expand All @@ -13,11 +13,11 @@ sphinx and odoc documentation. It has specific knowledge of Github and
will generate files for Github Actions CI and Github pages.
"""
authors: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
maintainer: [
"Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Léo Andrès <[email protected]>"
]
homepage: "https://ocamlpro.github.io/drom"
Expand Down
4 changes: 2 additions & 2 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

# General information about the project.
project = 'drom'
copyright = 'OCamlPro SAS & Origin Labs SAS'
author = 'Fabrice Le Fessant <fabrice.le_fessant@origin-labs.com> & Léo Andrès <[email protected]>'
copyright = 'OCamlPro SAS'
author = 'Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com> & Léo Andrès <[email protected]>'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion sphinx/license.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright and License
=====================

Copyright (c) 2023 OCamlPro SAS & Origin Labs SAS
Copyright (c) 2023 OCamlPro SAS

This software is distributed under the terms of the
GNU Lesser General Public License (LGPL) version 2.1 (included below).
Expand Down
Empty file modified src/drom/linking_flags.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/drom/main.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(**************************************************************************)
(* *)
(* Copyright (c) 2023 OCamlPro SAS & Origin Labs SAS *)
(* Copyright (c) 2023 OCamlPro SAS *)
(* *)
(* All rights reserved. *)
(* This file is distributed under the terms of the GNU Lesser General *)
Expand Down
Loading

0 comments on commit 3a349aa

Please sign in to comment.