Skip to content

Commit

Permalink
Merge pull request #110 from dcousineau/dcousineau/refactor-action-pr…
Browse files Browse the repository at this point in the history
…ereq-install

Refactor prerequisite installation
  • Loading branch information
jdkato authored Oct 11, 2023
2 parents 1edf87b + 67fa29c commit c99f2df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 51 deletions.
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.

0 comments on commit c99f2df

Please sign in to comment.