From e0a4daae3b43f2174f6f1f54a9f737b34250317c Mon Sep 17 00:00:00 2001 From: Gustavo Carreno Date: Thu, 6 Jan 2022 21:23:26 +0000 Subject: [PATCH] chore: Working, now cleaning up logging code --- README.md | 4 ++-- dist/index.js | 14 +------------- package.json | 2 +- src/Lazarus.ts | 12 ------------ src/setup-lazarus.ts | 2 +- 5 files changed, 5 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index c6735cd..3240767 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Unfortunately there are some restrictions: ```yaml steps: - uses: actions/checkout@v2 -- uses: gcarreno/setup-lazarus@v3.0.15 +- uses: gcarreno/setup-lazarus@v3.0.16 with: lazarus-version: "dist" include-packages: "Synapse 40.1" @@ -110,7 +110,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Lazarus - uses: gcarreno/setup-lazarus@v3.0.15 + uses: gcarreno/setup-lazarus@v3.0.16 with: lazarus-version: ${{ matrix.lazarus-versions }} include-packages: "Synapse 40.1" diff --git a/dist/index.js b/dist/index.js index e539302..5098d17 100644 --- a/dist/index.js +++ b/dist/index.js @@ -615,11 +615,7 @@ class Lazarus { // There MUST be a better way to do this var fpcsrc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpcsrc')); var loc = fs.readdirSync('/Volumes/' + fpcsrc[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + fpcsrc[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + fpcsrc[0] + '/' + loc[0]; @@ -649,11 +645,7 @@ class Lazarus { // There MUST be a better way to do this var fpc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpc')); var loc = fs.readdirSync('/Volumes/' + fpc[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + fpc[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + fpc[0] + '/' + loc[0]; @@ -683,11 +675,7 @@ class Lazarus { // There MUST be a better way to do this var laz = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('lazarus')); var loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + laz[0] + '/' + loc[0]; @@ -1031,7 +1019,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(186)); const inst = __importStar(__webpack_require__(981)); -const _version = '3.0.15'; +const _version = '3.0.16'; function run() { return __awaiter(this, void 0, void 0, function* () { try { diff --git a/package.json b/package.json index 5b76e0c..e178b42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-lazarus", - "version": "3.0.15", + "version": "3.0.16", "description": "Set up your GitHub Actions workflow with a specific version of Lazarus", "main": "lib/setup-lazarus.js", "scripts": { diff --git a/src/Lazarus.ts b/src/Lazarus.ts index 84c427c..2a9af4d 100644 --- a/src/Lazarus.ts +++ b/src/Lazarus.ts @@ -503,11 +503,7 @@ export class Lazarus{ // There MUST be a better way to do this var fpcsrc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpcsrc')); var loc = fs.readdirSync('/Volumes/'+fpcsrc[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+fpcsrc[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+fpcsrc[0]+'/'+loc[0] @@ -539,11 +535,7 @@ export class Lazarus{ // There MUST be a better way to do this var fpc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpc')); var loc = fs.readdirSync('/Volumes/'+fpc[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+fpc[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+fpc[0]+'/'+loc[0] @@ -576,11 +568,7 @@ export class Lazarus{ // There MUST be a better way to do this var laz = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('lazarus')); var loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.pkg')); - if (loc !== undefined && loc[0] !== undefined) { - console.log('loc and loc[0] not undefined'); - } if (loc === undefined || loc[0] === undefined) { - console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+laz[0]+'/'+loc[0] diff --git a/src/setup-lazarus.ts b/src/setup-lazarus.ts index d69aeaa..b009367 100644 --- a/src/setup-lazarus.ts +++ b/src/setup-lazarus.ts @@ -1,7 +1,7 @@ import * as core from '@actions/core'; import * as inst from './Installer'; -const _version = '3.0.15'; +const _version = '3.0.16'; async function run(): Promise { try {