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

Refactor prerequisite installation #110

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
1 change: 0 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,4 @@ inputs:

runs:
using: "node20"
pre: lib/pre.js
main: "lib/main.js"
5 changes: 5 additions & 0 deletions lib/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ function logIfDebug(msg) {
*/
function get(tok, dir) {
return __awaiter(this, void 0, void 0, function* () {
logIfDebug('Ensuring core python and ruby dependencies are present');
yield exec.exec('pip', ['install', 'docutils']);
logIfDebug('`pip install docutils` complete');
yield exec.exec('gem', ['install', 'asciidoctor', '--user-install']);
logIfDebug('`gem install asciidoctor --user-install` complete');
const localVale = yield (0, install_1.installLint)(core.getInput('version'));
const localReviewDog = yield (0, install_1.installReviewDog)("0.15.0");
const valeFlags = core.getInput("vale_flags");
Expand Down
42 changes: 0 additions & 42 deletions lib/pre.js

This file was deleted.

8 changes: 8 additions & 0 deletions src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ function logIfDebug(msg: string) {
* Parse our user input and set up our Vale environment.
*/
export async function get(tok: string, dir: string): Promise<Input> {
logIfDebug('Ensuring core python and ruby dependencies are present');

await exec.exec('pip', ['install', 'docutils']);
logIfDebug('`pip install docutils` complete');

await exec.exec('gem', ['install', 'asciidoctor', '--user-install']);
logIfDebug('`gem install asciidoctor --user-install` complete');

const localVale = await installLint(core.getInput('version'));
const localReviewDog = await installReviewDog("0.15.0");
const valeFlags = core.getInput("vale_flags");
Expand Down
8 changes: 0 additions & 8 deletions src/pre.ts

This file was deleted.