Compare commits

...

3 Commits

Author SHA1 Message Date
tali e355bac41c use some sneaky codegen to get the 'version' variable 2024-02-01 14:34:43 -05:00
tali b92d84f843 add metadata to dune-project 2024-02-01 14:24:20 -05:00
tali 3631cd8075 check in example motd 2024-02-01 14:08:40 -05:00
6 changed files with 45 additions and 15 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
_build/
_build/
_opam/
*.install

View File

@ -1,13 +1,21 @@
(lang dune 3.8)
(name talircd)
(version 0.0.1)
(generate_opam_files true)
(package
(name talircd)
(depends
ocaml
dune
(lwt (= 5.7.0))
(ppx_expect (= v0.16.0))
(ppx_deriving (= 5.2.1))
(fmt (= 0.9.0))
(ptime (= 1.1.0))))
(synopsis "IRC server")
(description "IRC server for cats written in ocaml")
(license "LGPL-2.0-or-later")
(homepage "https://git.lain.faith/iitalics/talircd/")
(bug_reports "https://git.lain.faith/iitalics/talircd/issues")
(authors "iitalics <git.lain.faith/iitalics>")
(maintainers "iitalics <git.lain.faith/iitalics>")
(depends ocaml dune
(lwt (= 5.7.0))
(ppx_expect (= v0.16.0))
(ppx_deriving (= 5.2.1))
(fmt (= 0.9.0))
(ptime (= 1.1.0))))

View File

@ -6,3 +6,10 @@
logging irc data)
(inline_tests)
(preprocess (pps ppx_expect)))
(rule
(package talircd)
(target "meta_server_info.ml")
(action
(with-stdout-to %{target}
(echo "let version = \"%{version:talircd}\";;"))))

View File

@ -1,4 +1,7 @@
open! Import
include (Meta_server_info : sig
val version : string
end)
let tz_offset_s = Ptime_clock.current_tz_offset_s ()
let pp_time = Ptime.pp_human () ?tz_offset_s
@ -37,15 +40,11 @@ let default_conf = {
init_cmode = Mode.Set.of_list [`n; `s; `t];
}
let admin_info = "the admin of this server is @iitalics@octodon.social"
let version = "0.0.0"
(* TODO: generate version string at build time? *)
let make ?(conf = default_conf) ~hostname ~motd () = {
version = version;
version;
created = Fmt.str "%a" pp_time (Ptime_clock.now ());
admin_info = "the admin of this server is @iitalics@octodon.social";
hostname;
admin_info;
motd;
conf;
}

6
motd.txt Normal file
View File

@ -0,0 +1,6 @@
--------------------------------------------
MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW
Meow Meow Meow Meow Meow Meow Meow Meow Meow
meow meow meow meow meow meow meow meow meow
meow meow meow meow meow meow meow meow meow
--------------------------------------------

View File

@ -1,5 +1,13 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.0.1"
synopsis: "IRC server"
description: "IRC server for cats written in ocaml"
maintainer: ["iitalics <git.lain.faith/iitalics>"]
authors: ["iitalics <git.lain.faith/iitalics>"]
license: "LGPL-2.0-or-later"
homepage: "https://git.lain.faith/iitalics/talircd/"
bug-reports: "https://git.lain.faith/iitalics/talircd/issues"
depends: [
"ocaml"
"dune" {>= "3.8"}