Skip to content

Commit

Permalink
YAWN
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Jul 23, 2023
1 parent 49cb4a2 commit 5dd2df9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
8 changes: 1 addition & 7 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(2186));
const fs = __importStar(__nccwpck_require__(7147));
const exec_1 = __nccwpck_require__(1514);
const execute = async (command, options = {}) => {
let stdOut = "";
Expand All @@ -51,11 +50,7 @@ const execute = async (command, options = {}) => {
return { err: exitCode !== 0, stdErr, stdOut };
};
const run = async () => {
const requirementsContent = "rstfmt==0.0.13\n";
fs.writeFileSync("./requirements.txt", requirementsContent);
// type "ls" on the command line and execute it:
await execute("echo $HOME", { silent: true });
await execute("pip install -r requirements.txt", { silent: true });
await execute("pip install rstfmt==0.0.13", { silent: true });
const filesPattern = core.getInput("files") || "**/*.rst";
const commitString = core.getInput("commit") || "true";
const commit = commitString.toLowerCase() !== "false";
Expand All @@ -75,7 +70,6 @@ const run = async () => {
if (commit) {
await execute(`git config user.name "${githubUsername}"`, { silent: true });
await execute("git config user.email ''", { silent: true });
fs.unlinkSync("./requirements.txt"); // Remove temporary requirements.txt
const { err } = await execute("git diff-index --quiet HEAD", {
silent: true,
});
Expand Down
10 changes: 1 addition & 9 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ const execute = async (
};

const run = async () => {
const requirementsContent = "rstfmt==0.0.13\n";
fs.writeFileSync("./requirements.txt", requirementsContent);
// type "ls" on the command line and execute it:
await execute("echo $HOME", { silent: true });


await execute("pip install -r requirements.txt", { silent: true });
await execute("pip install rstfmt==0.0.13", { silent: true });

const filesPattern = core.getInput("files") || "**/*.rst";

Expand All @@ -59,8 +53,6 @@ const run = async () => {
await execute(`git config user.name "${githubUsername}"`, { silent: true });
await execute("git config user.email ''", { silent: true });

fs.unlinkSync("./requirements.txt"); // Remove temporary requirements.txt

const { err } = await execute("git diff-index --quiet HEAD", {
silent: true,
});
Expand Down

0 comments on commit 5dd2df9

Please sign in to comment.