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

Fix order of steps in lint-fmt job #959

Merged
merged 1 commit into from
Aug 3, 2024
Merged
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
24 changes: 13 additions & 11 deletions lib/lint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,20 @@ let fmt_spec ~base ~ocamlformat_source ~selection =
Option.value ~default:commit (commit_from_ocamlformat_source source)
in
let network = [ "host" ] in
install_ocamlformat source
[
user_unix ~uid:1000 ~gid:1000;
run ~network ~cache
"cd ~/opam-repository && (git cat-file -e %s || git fetch origin \
master) && git reset -q --hard %s && git log --no-decorate -n1 \
--oneline && opam update -u"
commit commit;
run ~network ~cache "opam depext -i dune";
(* Necessary in case current compiler < 4.08 *)
(* Not necessarily the dune version used by the project *)
workdir "/src";
]
@ install_ocamlformat source
@ [
user_unix ~uid:1000 ~gid:1000;
run ~network ~cache
"cd ~/opam-repository && (git cat-file -e %s || git fetch origin \
master) && git reset -q --hard %s && git log --no-decorate -n1 \
--oneline && opam update -u"
commit commit;
run ~network ~cache "opam depext -i dune";
(* Necessary in case current compiler < 4.08 *)
(* Not necessarily the dune version used by the project *)
workdir "/src";
copy [ "." ] ~dst:"/src/";
run
"opam exec -- dune build @fmt --ignore-promoted-rules || (echo \
Expand Down