Skip to content

Commit 9260aa6

Browse files
authored
chore(version): bump version to v2.2.0 (#29)
1 parent a8fc356 commit 9260aa6

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

dist/index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6366,16 +6366,29 @@ const { Octokit } = __nccwpck_require__(231);
63666366
const core = __nccwpck_require__(186);
63676367
const github = __nccwpck_require__(438);
63686368
const { execSync } = __nccwpck_require__(129);
6369+
const { existsSync } = __nccwpck_require__(747);
6370+
const { join } = __nccwpck_require__(622);
63696371

63706372
const { runId, repo: { repo, owner }, eventName } = github.context;
63716373
process.env.GITHUB_TOKEN = process.argv[2];
63726374
const mainBranchName = process.argv[3];
63736375
const errorOnNoSuccessfulWorkflow = process.argv[4];
63746376
const lastSuccessfulEvent = process.argv[5];
6375-
const workflowId = process.argv[6];
6377+
const workingDirectory = process.argv[6];
6378+
const workflowId = process.argv[7];
6379+
const defaultWorkingDirectory = '.';
63766380

63776381
let BASE_SHA;
63786382
(async () => {
6383+
if (workingDirectory !== defaultWorkingDirectory) {
6384+
if (existsSync(workingDirectory)) {
6385+
process.chdir(join(__dirname, workingDirectory));
6386+
} else {
6387+
process.stdout.write('\n');
6388+
process.stdout.write(`WARNING: Working directory '${workingDirectory}' doesn't exist.\n`);
6389+
}
6390+
}
6391+
63796392
const HEAD_SHA = execSync(`git rev-parse HEAD`, { encoding: 'utf-8' });
63806393

63816394
if (eventName === 'pull_request') {
@@ -6397,7 +6410,7 @@ let BASE_SHA;
63976410
process.stdout.write(`WARNING: Unable to find a successful workflow run on 'origin/${mainBranchName}'\n`);
63986411
process.stdout.write(`We are therefore defaulting to use HEAD~1 on 'origin/${mainBranchName}'\n`);
63996412
process.stdout.write('\n');
6400-
process.stdout.write(`NOTE: You can instead make this a hard error by settting 'error-on-no-successful-workflow' on the action in your workflow.\n`);
6413+
process.stdout.write(`NOTE: You can instead make this a hard error by setting 'error-on-no-successful-workflow' on the action in your workflow.\n`);
64016414

64026415
BASE_SHA = execSync(`git rev-parse HEAD~1`, { encoding: 'utf-8' });
64036416
core.setOutput('noPreviousBuild', 'true');

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "2.1.6",
3+
"version": "2.2.0",
44
"license": "MIT",
55
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action",
66
"scripts": {

0 commit comments

Comments
 (0)