From 9252820289f71f34d27575c8bf574c85ce03ec50 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 2 Mar 2020 19:39:18 +0530 Subject: [PATCH] Fix logs of blackfire setup --- dist/index.js | 7 +++++++ package-lock.json | 40 ++++++++++++++++++++++++---------------- package.json | 4 ++-- src/scripts/darwin.sh | 3 ++- src/scripts/linux.sh | 2 ++ src/scripts/win32.ps1 | 2 ++ 6 files changed, 39 insertions(+), 19 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9d96caae..8d46cf46 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1480,6 +1480,13 @@ exports.setFailed = setFailed; //----------------------------------------------------------------------- // Logging Commands //----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; /** * Writes debug message to user log * @param message debug message diff --git a/package-lock.json b/package-lock.json index 41278b60..855e7e59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz", - "integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz", + "integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==" }, "@actions/exec": { "version": "1.0.3", @@ -774,9 +774,9 @@ "dev": true }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "acorn-globals": { @@ -822,12 +822,20 @@ } }, "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-regex": { @@ -1875,9 +1883,9 @@ } }, "eslint-plugin-jest": { - "version": "23.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.8.0.tgz", - "integrity": "sha512-DKXmLxguZ1Lru4u5YM12ko3WLq6gqo7dhV2b63K731+/PNyZ/Ff6NGONQsGUtPLG9zU3kdz/N+2LTbweNZifeg==", + "version": "23.8.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.8.1.tgz", + "integrity": "sha512-OycLNqPo/2EfO6kTqnmsu1khz1gTIOxGl3ThIVwL5/oycDF4pm5uNDyvFelNLdpr4COUuM8PVi3963NEG1Efpw==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^2.5.0" @@ -2498,9 +2506,9 @@ } }, "hosted-git-info": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.7.tgz", - "integrity": "sha512-ChkjQtKJ3GI6SsI4O5jwr8q8EPrWCnxuc4Tbx+vRI5x6mDOpjKKltNo1lRlszw3xwgTOSns1ZRBiMmmwpcvLxg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "html-encoding-sniffer": { diff --git a/package.json b/package.json index f5dcfe4a..75143cff 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "author": "shivammathur", "license": "MIT", "dependencies": { - "@actions/core": "^1.2.2", + "@actions/core": "^1.2.3", "@actions/exec": "^1.0.3", "@actions/io": "^1.0.2", "fs": "0.0.1-security" @@ -38,7 +38,7 @@ "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-plugin-import": "^2.20.1", - "eslint-plugin-jest": "^23.8.0", + "eslint-plugin-jest": "^23.8.1", "eslint-plugin-prettier": "^3.1.2", "husky": "^4.2.3", "jest": "^25.1.0", diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 925d5f28..7028217a 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -141,7 +141,8 @@ add_blackfire() { sudo blackfire-agent --register --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN" >/dev/null 2>&1 brew services start blackfire-agent >/dev/null 2>&1 sudo blackfire --config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN" >/dev/null 2>&1 - + add_log "$tick" "blackfire" "Added" + add_log "$tick" "blackfire-agent" "Added" } # Function to configure PECL diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index d1c9de50..35077fa0 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -204,6 +204,8 @@ add_blackfire() { sudo blackfire-agent --register --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN" >/dev/null 2>&1 sudo /etc/init.d/blackfire-agent restart >/dev/null 2>&1 sudo blackfire --config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN" >/dev/null 2>&1 + add_log "$tick" "blackfire" "Added" + add_log "$tick" "blackfire-agent" "Added" } # Function to setup the nightly build from master branch diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index d453e6fb..185a1d99 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -185,6 +185,8 @@ Function Add-Blackfire() { if ((Test-Path env:BLACKFIRE_CLIENT_ID) -and (Test-Path env:BLACKFIRE_CLIENT_TOKEN)) { blackfire --config --client-id=$env:BLACKFIRE_CLIENT_ID --client-token=$env:BLACKFIRE_CLIENT_TOKEN --ca-cert=$php_dir\ssl\cacert.pem >$null 2>&1 } + Add-Log $tick "blackfire" "Added" + Add-Log $tick "blackfire-agent" "Added" } # Variables