Skip to content

Commit

Permalink
Merge pull request #837 from ocaml/always-install-dune
Browse files Browse the repository at this point in the history
Always install dune within every extends
  • Loading branch information
smorimoto committed Aug 4, 2024
2 parents 37729d8 + 1c7a3ed commit 0d70ed3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to

## [unreleased]

### Fixed

- Always install dune within every extends.

## [3.0.2]

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions analysis/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lint-fmt/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/analysis/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as process from "node:process";
import * as core from "@actions/core";
import { analysis } from "./analysis.js";
import { installOpamPackages } from "./opam.js";
import { installDune, installOpamPackages } from "./opam.js";

async function run() {
try {
await installOpamPackages();
await installDune();
await analysis();
process.exit(0);
} catch (error) {
Expand Down
6 changes: 6 additions & 0 deletions packages/analysis/src/opam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ export async function installOpamPackages() {
]);
});
}

export async function installDune() {
await core.group("Install dune", async () => {
await exec("opam", ["install", "dune"]);
});
}
3 changes: 2 additions & 1 deletion packages/lint-fmt/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import * as process from "node:process";
import * as core from "@actions/core";
import { checkFmt } from "./lint.js";
import { getOcamlformatVersion } from "./ocamlformat.js";
import { installOcamlformat } from "./opam.js";
import { installDune, installOcamlformat } from "./opam.js";

async function run() {
try {
const version = await getOcamlformatVersion();
if (version) {
await installOcamlformat(version);
}
await installDune();
await checkFmt();
process.exit(0);
} catch (error) {
Expand Down
6 changes: 6 additions & 0 deletions packages/lint-fmt/src/opam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ export async function installOcamlformat(version: string) {
await exec("opam", ["install", `ocamlformat=${version}`]);
});
}

export async function installDune() {
await core.group("Install dune", async () => {
await exec("opam", ["install", "dune"]);
});
}

0 comments on commit 0d70ed3

Please sign in to comment.