Merge pull request #179 from codecov/dependabot/npm_and_yarn/typescript-4.1.3

Bump typescript from 4.1.2 to 4.1.3
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..d416f2e
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,19 @@
+### 1.1.1
+
+#### Fixes
+- #184 Add automations ensure proper builds and deployments
+- #184 Fixes verbose flag
+
+### 1.1.0
+
+#### Features
+- #110 Add "working-directory:" input
+- #174 Support Xcode specificed parameters
+
+#### Fixes
+- #172 File is saved as text
+
+#### Dependencies and Misc
+- #166 Bump requestretry from 4.1.1 to 4.1.2
+- #169 Bump typescript from 4.0.5 to 4.1.2
+- #178 Bump @types/jest from 26.0.15 to 26.0.19
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..109980d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,7 @@
+deploy:
+	$(eval VERSION := $(shell cat package.json | grep '"version": ' | cut -d\" -f4))
+	git tag -d v1
+	git push origin :v1
+	git tag v1
+	git tag v$(VERSION) -m ""
+	git push origin --tags
diff --git a/README.md b/README.md
index 59ffcb7..4025d13 100644
--- a/README.md
+++ b/README.md
@@ -33,8 +33,6 @@
 
 Codecov's Action currently supports five inputs from the user: `token`, `file`, `flags`,`name`, and `fail_ci_if_error`. These inputs, along with their descriptions and usage contexts, are listed in the table below:
 
->**Update**: We've removed the `yml` parameter with the latest release of this action. Please put your custom codecov yaml file at the root of the repo because other locations will no longer be supported in the future.
-
 | Input  | Description | Usage |
 | :---:     |     :---:   |    :---:   |
 | `token`  | Used to authorize coverage report uploads  | *Required for private repos* |
@@ -47,6 +45,7 @@
 | `fail_ci_if_error`  | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
 | `path_to_write_report` | Write upload file to path before uploading | Optional
 | `verbose` | Specify whether the Codecov output should be verbose | Optional
+| `working-directory` | Directory in which to execute `codecov.sh` | Optional
 | `xcode_derived_data` | Custom Derived Data Path for Coverage.profdata and gcov processing | Optional
 | `xcode_package` | Specify packages to build coverage. Uploader will only build these packages. This can significantly reduces time to build coverage reports. -J 'MyAppName' Will match "MyAppName" and "MyAppNameTests" -J '^ExampleApp$' Will match only "ExampleApp" not "ExampleAppTests" | Optional
 
diff --git a/action.yml b/action.yml
index fb6c391..106a666 100644
--- a/action.yml
+++ b/action.yml
@@ -32,6 +32,9 @@
   verbose:
     description: 'Specify whether the Codecov output should be verbose'
     required: false
+  working-directory:
+    description: 'Directory in which to execute codecov.sh'
+    required: false
 branding:
   color: 'red'
   icon: 'umbrella'
diff --git a/dist/index.js b/dist/index.js
index 462a66c..3677daa 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -2520,6 +2520,7 @@
 const request = __webpack_require__(335);
 
 let fail_ci;
+let verbose;
 try {
   const name = core.getInput("name");
   const token = core.getInput("token");
@@ -2529,9 +2530,12 @@
   const env_vars = core.getInput("env_vars");
   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();
+  verbose = core.getInput("verbose").toLowerCase();
 
   if (
     fail_ci === "yes" ||
@@ -2545,6 +2549,18 @@
     fail_ci = false;
   }
 
+  if (
+    verbose === "yes" ||
+    verbose === "y" ||
+    verbose === "true" ||
+    verbose === "t" ||
+    verbose === "1"
+  ) {
+    verbose = true;
+  } else {
+    verbose = false;
+  }
+
   request({
     json: false,
     maxAttempts: 10,
@@ -2651,6 +2667,22 @@
           );
         }
 
+        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 100755
index 0000000..ea68e88
--- /dev/null
+++ b/hooks/pre-commit
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+npm i --package-lock-only
+npm run build
+git add dist/index.js
diff --git a/index.js b/index.js
index 58cef7a..a171233 100644
--- a/index.js
+++ b/index.js
@@ -4,6 +4,7 @@
 const request = require('requestretry');
 
 let fail_ci;
+let verbose;
 try {
   const name = core.getInput("name");
   const token = core.getInput("token");
@@ -13,11 +14,12 @@
   const env_vars = core.getInput("env_vars");
   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();
+  verbose = core.getInput("verbose").toLowerCase();
 
   if (
     fail_ci === "yes" ||
@@ -31,6 +33,18 @@
     fail_ci = false;
   }
 
+  if (
+    verbose === "yes" ||
+    verbose === "y" ||
+    verbose === "true" ||
+    verbose === "t" ||
+    verbose === "1"
+  ) {
+    verbose = true;
+  } else {
+    verbose = false;
+  }
+
   request({
     json: false,
     maxAttempts: 10,
@@ -137,6 +151,10 @@
           );
         }
 
+        if (working_dir) {
+          options.cwd = working_dir;
+        }
+
         if (xcode_derived_data) {
           execArgs.push(
             "-D", `${xcode_derived_data}`
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..de83bb5
--- /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 ../../hooks/$i
+done
diff --git a/package-lock.json b/package-lock.json
index 2fb0101..2b6d677 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "codecov-action",
-  "version": "1.0.15",
+  "version": "1.1.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -2119,8 +2119,7 @@
     "growly": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
-      "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
-      "optional": true
+      "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE="
     },
     "har-schema": {
       "version": "2.0.0",
@@ -2407,7 +2406,6 @@
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
       "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
-      "optional": true,
       "requires": {
         "is-docker": "^2.0.0"
       }
@@ -4060,6 +4058,14 @@
       "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
       "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
     },
+    "lru-cache": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+      "requires": {
+        "yallist": "^4.0.0"
+      }
+    },
     "make-dir": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -4214,10 +4220,9 @@
       "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
     },
     "node-notifier": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.0.tgz",
-      "integrity": "sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==",
-      "optional": true,
+      "version": "8.0.1",
+      "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.1.tgz",
+      "integrity": "sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==",
       "requires": {
         "growly": "^1.3.0",
         "is-wsl": "^2.2.0",
@@ -4228,22 +4233,22 @@
       },
       "dependencies": {
         "semver": {
-          "version": "7.3.2",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
-          "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
-          "optional": true
+          "version": "7.3.4",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
+          "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
         },
         "uuid": {
-          "version": "8.3.1",
-          "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
-          "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==",
-          "optional": true
+          "version": "8.3.2",
+          "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+          "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
         },
         "which": {
           "version": "2.0.2",
           "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
           "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
-          "optional": true,
           "requires": {
             "isexe": "^2.0.0"
           }
@@ -4901,8 +4906,7 @@
     "shellwords": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
-      "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
-      "optional": true
+      "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
     },
     "signal-exit": {
       "version": "3.0.3",
@@ -5620,6 +5624,11 @@
       "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
       "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
     },
+    "yallist": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+    },
     "yargs": {
       "version": "15.4.1",
       "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
diff --git a/package.json b/package.json
index 15d1146..8716ed2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "codecov-action",
-  "version": "1.0.15",
+  "version": "1.1.1",
   "description": "Upload coverage reports to Codecov from GitHub Actions",
   "main": "index.js",
   "scripts": {