Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.9.2 #3

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

Version 0.9.2 (2023-??-??)
* Packages:
* New field `dune-flags`, with value `:standard` by default
* Package `program` and `driver`:
* Field `dune-flags` initialized to `:standard (:include linking.sexp)`
* Package `js_program`, `js_driver` and `js_library`:
* Remove default preprocessor in dune_
* Use !{program-name} as dune name

Version 0.9.1 (2023-03-13)
* Add CHANGES.md
* `virtual` project skeletons (inherited by all):
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@

Versioned files for `drom`

## How to update

1. Modify the files you need to
2. Push in a branch
3. Test using `--share-version <local>:<branch>` where `<local>` is a remote
to your local GIT repository from
`$HOME/.config/drom/shares/7413cde042d5d886501c908e2ea77f6d`
and `<branch>` is the branch you want to test
4. Edit the files:
* `VERSION`: the new version of this branch
* `LATEST`: a *stable* version that users are advised to use
* `DROM_VERSION`: if `drom` must be upgraded to use this version
5. Push to `master` and remote tag the version

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.1
0.9.2
5 changes: 2 additions & 3 deletions skeletons/packages/js_driver/dune_
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
; generated by drom from package skeleton 'js_driver'

(executable
(name main)
(name !{library-name})
(libraries !{dune-libraries} !(package-dune-libraries))
(modes js)
(preprocess (pps js_of_ocaml-ppx))
!{dune-stanzas}
)

(install
(files (main.bc.js as www/js/!{name}.js))
(files (!{library-name}.bc.js as www/js/!{name}.js))
(section share)
(package !{name}))

Expand Down
2 changes: 1 addition & 1 deletion skeletons/packages/js_driver/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ inherits = "virtual"

[file]
dune_ = { file = "dune", skips = [ "@dune" ] }
"main.ml" = { skips = [ "@code" ] }
"main.ml" = { skips = [ "@code" ], create = true }
1 change: 0 additions & 1 deletion skeletons/packages/js_library/dune_
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
(public_name !{name})
(wrapped !{pack-modules})
(libraries !{dune-libraries} !(package-dune-libraries))
(preprocess (pps js_of_ocaml-ppx))
(modes byte)
!{dune-stanzas}
!(package-dune-stanzas)
Expand Down
2 changes: 1 addition & 1 deletion skeletons/packages/js_library/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ inherits = "virtual"

[file]
dune_ = { file = "dune", skips = [ "@dune" ] }
"main.ml" = { skips = [ "@code" ] }
"main.ml" = { skips = [ "@code" ], create = true }
5 changes: 2 additions & 3 deletions skeletons/packages/js_program/dune_
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
; generated by drom from package skeleton 'js_program'

(executable
(name main)
(name !{library-name})
(libraries !{dune-libraries} !(package-dune-libraries))
(modes js)
(preprocess (pps js_of_ocaml-ppx))
!{dune-stanzas}
)

(install
(files (main.bc.js as www/js/!{name}.js))
(files (!{library-name}.bc.js as www/js/!{name}.js))
(section share)
(package !{name}))

Expand Down
2 changes: 1 addition & 1 deletion skeletons/packages/js_program/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ inherits = "virtual"

[file]
dune_ = { file = "dune", skips = [ "@dune" ] }
"main.ml" = { skips = [ "@code" ] }
"main.ml" = { file = "!{library-name}.ml", skips = [ "@code" ], create = true }
5 changes: 5 additions & 0 deletions skeletons/packages/library/dune_
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
(name !{library-name})
(public_name !{name})
(wrapped !{pack-modules})
; use field 'dune-libraries' to add libraries without opam deps
(libraries !{dune-libraries} !(package-dune-libraries))
; use field 'dune-flags' to set this value
(flags (!(dune-flags:default::standard)))
; use field 'dune-stanzas' to add more stanzas here
!{dune-stanzas}
!(package-dune-stanzas)
)
Expand All @@ -13,4 +17,5 @@
(documentation
(package !{package-name}))
!{package-dune-installs}
; use field 'dune-trailer' to add more stuff here
!(package-dune-trailer)
4 changes: 4 additions & 0 deletions skeletons/packages/program/dune_
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
(name main)
(public_name !{program-name})
(package !{name})
; use field 'dune-libraries' to add libraries without opam deps
(libraries !{dune-libraries} !(package-dune-libraries))
(flags (!(dune-flags:default::standard)))
; use field 'dune-stanzas' to add more stanzas here
!{dune-stanzas}
!(package-dune-stanzas)
)
Expand All @@ -28,4 +31,5 @@
(documentation
(package !{package-name}))
!{package-dune-installs}
; use field 'dune-trailer' to add more stuff here
!(package-dune-trailer)
3 changes: 3 additions & 0 deletions skeletons/packages/program/linking_flags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ case $(uname -s) in
Linux)
case $(. /etc/os-release && echo $ID) in
alpine)
# Use `static-alpine-clibs` field to add libs more here
# (or `static-clibs` for both Linux and Macos)
COMMON_LIBS="!(static-alpine-clibs) camlstr unix c"
# `m` and `pthread` are built-in musl
echo2 '(-noautolink'
Expand All @@ -68,6 +70,7 @@ case $(uname -s) in
esac
;;
Darwin)
# Use `static-macos-clibs` field to add libs more here
COMMON_LIBS="!(static-macos-clibs) unix"
# `m` and `pthread` are built-in in libSystem
echo2 '(-noautolink'
Expand Down
3 changes: 3 additions & 0 deletions skeletons/packages/program/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

skeleton := "program"
kind := "program"

[fields]
dune-flags = ":standard (:include linking.sexp)"
4 changes: 3 additions & 1 deletion skeletons/projects/virtual/scripts/static-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ cd $(dirname "$0")/..
set -o pipefail

git ls-files -z | xargs -0 tar c | \
docker run --rm -i \
docker run --rm -i \
# Use `docker-alpine-image` field to replace ocamlpro/ocaml:4.13
# and `docker-alpine-packages` to add more apk packages
!(docker-alpine-image:default:ocamlpro/ocaml:4.13) \
sh -uexc \
'tar x >&2 &&
Expand Down
3 changes: 3 additions & 0 deletions skeletons/projects/virtual/skeleton.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ name = "virtual"
"CHANGES.md" = {
file = "CHANGES.md", create = true
}
"README.md" = {
file = "README.md", create = true
}

"dot_ocp-indent" = {
file = ".ocp-indent", create = true,
Expand Down