From afea49fa57e678f9c8117d73415a488600b3cd28 Mon Sep 17 00:00:00 2001 From: Viktor Kuroljov Date: Mon, 13 Jul 2020 13:58:49 +0300 Subject: [PATCH] feat(pre-commit): Allow relative path for the pre-commit input --- .github/workflows/test.yml | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcde197..70b6fe1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: ENV: 'dont-use-git' with: github-token: ${{ secrets.github_token }} - pre-commit: ${{ github.workspace }}/test/pre-commit.js + pre-commit: test/pre-commit.js skip-on-empty: 'false' - run: test -f pre-commit.test.json || (echo should be here && exit 1) diff --git a/src/index.js b/src/index.js index 4e9455d..713819c 100644 --- a/src/index.js +++ b/src/index.js @@ -103,7 +103,7 @@ async function run() { if (!skipCommit) { // Add changed files to git if (preCommit) { - await require(preCommit).preCommit({ + await require(path.resolve(preCommit)).preCommit({ tag: gitTag, version: versioning.newVersion, })