diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..e69de29bb diff --git a/dist/index.js b/dist/index.js index 462a66c53..1951fed0c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2530,6 +2530,9 @@ try { const dir = core.getInput("directory"); const write_path = core.getInput("path_to_write_report"); const verbose = core.getInput("verbose"); + const working_dir = core.getInput("working-directory"); + const xcode_derived_data = core.getInput("xcode_derived_data"); + const xcode_package = core.getInput("xcode_package"); fail_ci = core.getInput("fail_ci_if_error").toLowerCase(); @@ -2651,6 +2654,22 @@ try { ); } + if (working_dir) { + options.cwd = working_dir; + } + + if (xcode_derived_data) { + execArgs.push( + "-D", `${xcode_derived_data}` + ); + } + + if (xcode_package) { + execArgs.push( + "-J", `${xcode_package}` + ); + } + exec.exec("bash", execArgs, options) .catch(err => { if (fail_ci) { diff --git a/hooks/pre-commit b/hooks/pre-commit new file mode 100644 index 000000000..1000db052 --- /dev/null +++ b/hooks/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +npm i --package-lock-only +npm run build diff --git a/install.sh b/install.sh new file mode 100755 index 000000000..c374b407d --- /dev/null +++ b/install.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +if ! [ -e .git ]; then + echo "Please run this from repo root directory" + exit 1 +fi + +cd .git/hooks +for i in pre-commit; do + rm -fv $i + ln -sv ../../hook/$i +done diff --git a/package.json b/package.json index 874b94462..e1466c163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codecov-action", - "version": "1.0.16", + "version": "1.1.1", "description": "Upload coverage reports to Codecov from GitHub Actions", "main": "index.js", "scripts": {