feat(pre-commit): Allow relative path for the pre-commit input

releases/v3
Viktor Kuroljov 2020-07-13 13:58:49 +03:00
parent 5675cecaa4
commit afea49fa57
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ jobs:
ENV: 'dont-use-git' ENV: 'dont-use-git'
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
pre-commit: ${{ github.workspace }}/test/pre-commit.js pre-commit: test/pre-commit.js
skip-on-empty: 'false' skip-on-empty: 'false'
- run: test -f pre-commit.test.json || (echo should be here && exit 1) - run: test -f pre-commit.test.json || (echo should be here && exit 1)

View File

@ -103,7 +103,7 @@ async function run() {
if (!skipCommit) { if (!skipCommit) {
// Add changed files to git // Add changed files to git
if (preCommit) { if (preCommit) {
await require(preCommit).preCommit({ await require(path.resolve(preCommit)).preCommit({
tag: gitTag, tag: gitTag,
version: versioning.newVersion, version: versioning.newVersion,
}) })