-
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.
just: replace
make
, update targets, format, lint
- Loading branch information
Showing
10 changed files
with
240 additions
and
232 deletions.
There are no files selected for viewing
Empty file.
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,60 @@ | ||
# SPDX-FileCopyrightText: 2024 Richard Mortier <[email protected]> | ||
# | ||
# SPDX-License-Identifier: ISC | ||
|
||
_default: | ||
@just --list | ||
|
||
PWD := env("PWD") | ||
DOCDIR := "_build/default/_doc/_html" | ||
BUILDDIR := "_build/install/default/bin" | ||
TARGET := "ocal" | ||
|
||
# build targets | ||
build: | ||
dune build @all | ||
|
||
# cleanup | ||
clean: | ||
dune clean | ||
|
||
# install targets | ||
install: build | ||
dune build @install | ||
ln -sf {{PWD}}/{{BUILDDIR}}/{{TARGET}} ~/.local/bin/ | ||
|
||
# uninstall targets | ||
uninstall: | ||
dune uninstall | ||
|
||
# run any tests | ||
test: | ||
dune runtest | ||
|
||
# format sources | ||
format: | ||
dune fmt | ||
|
||
# lint everything | ||
lint: | ||
dune build @lint | ||
dune-release lint | ||
|
||
# build docs | ||
doc: | ||
dune build @doc | ||
dune build @doc-private | ||
|
||
# open the docs for reading | ||
read: doc | ||
handlr open {{DOCDIR}}/index.html || open {{DOCDIR}} | ||
|
||
# tag and create a release | ||
release: | ||
dune-release tag | ||
dune-release -vv | ||
|
||
# install dependencies | ||
depends: | ||
opam install --yes dune-release odoc | ||
opam install --yes . --deps-only |
File renamed without changes.
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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
;;; SPDX-FileCopyrightText: 2024 Richard Mortier <[email protected]> | ||
;;; | ||
;;; SPDX-License-Identifier: ISC | ||
(lang dune 3.17) | ||
|
||
(lang dune 1.0) | ||
(name ocal) | ||
|
||
(generate_opam_files true) | ||
|
||
(source | ||
(github mor1/ocal)) | ||
|
||
(authors "Richard Mortier <[email protected]>") | ||
|
||
(maintainers "Richard Mortier <[email protected]>") | ||
|
||
(license MIT) | ||
|
||
(package | ||
(name ocal) | ||
(synopsis "An improved UNIX `cal` utility") | ||
(description "Replace `cal` because I could and because I find the CLI irritating") | ||
(tags | ||
())) |
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 |
---|---|---|
@@ -1,32 +1,29 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
maintainer: "Richard Mortier <[email protected]>" | ||
authors: [ "Richard Mortier" ] | ||
license: "ISC" | ||
|
||
synopsis: "An improved UNIX `cal` utility" | ||
description: | ||
"Replace `cal` because I could and because I find the CLI irritating" | ||
maintainer: ["Richard Mortier <[email protected]>"] | ||
authors: ["Richard Mortier <[email protected]>"] | ||
license: "MIT" | ||
homepage: "https://github.com/mor1/ocal" | ||
dev-repo: "git+https://github.com/mor1/ocal.git" | ||
bug-reports: "https://github.com/mor1/ocal/issues" | ||
doc: "https://mor1.github.io/ocal/" | ||
|
||
build: [ | ||
["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
] | ||
|
||
depends: [ | ||
"astring" {build} | ||
"calendar" {build} | ||
"cmdliner" {build} | ||
"dune" {build} | ||
"notty" {build & >="0.2.0"} | ||
"ocaml" {build & >="4.02.3"} | ||
"dune" {>= "3.17"} | ||
"odoc" {with-doc} | ||
] | ||
|
||
synopsis: "An improved Unix `cal` utility" | ||
|
||
description: """ | ||
`ocal` is a replacement for the standard Unix `cal` utility. | ||
Partly because I could, partly because I'd become too irritated with its command | ||
line interface. | ||
""" | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/mor1/ocal.git" |
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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
#!/usr/bin/env ocaml | ||
|
||
(* | ||
* SPDX-FileCopyrightText: 2024 Richard Mortier <[email protected]> | ||
* | ||
* SPDX-License-Identifier: ISC | ||
*) | ||
|
||
#!/usr/bin/env ocaml | ||
#use "topfind" | ||
|
||
#require "topkg-jbuilder" | ||
|
||
open Topkg | ||
|
||
let publish = | ||
Pkg.publish ~artefacts:[`Distrib] () | ||
|
||
let () = | ||
Topkg_jbuilder.describe ~publish () | ||
let publish = Pkg.publish ~artefacts:[ `Distrib ] () | ||
let () = Topkg_jbuilder.describe ~publish () |
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
Oops, something went wrong.