Skip to content

Commit

Permalink
Add makefile and automations
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu committed Dec 20, 2020
1 parent 7de43a7 commit c6de3f8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
Empty file added Makefile
Empty file.
19 changes: 19 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

npm i --package-lock-only
npm run build
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit c6de3f8

Please sign in to comment.