diff --git a/.github/workflows/bring-it.yaml b/.github/workflows/bring-it.yaml index 43fff61..c18c9e3 100644 --- a/.github/workflows/bring-it.yaml +++ b/.github/workflows/bring-it.yaml @@ -11,8 +11,8 @@ jobs: strategy: matrix: os: - - macos-latest - - windows-latest + # - macos-latest + # - windows-latest - ubuntu-latest node: - lts/* diff --git a/packages/notify/lib/utils.mjs b/packages/notify/lib/utils.mjs index b9e4167..99e6ed4 100644 --- a/packages/notify/lib/utils.mjs +++ b/packages/notify/lib/utils.mjs @@ -127,14 +127,28 @@ function getlog(since, until) { function getLogs() { try { return getlog(GIT_PREVIOUS_COMMIT, GIT_COMMIT); - } catch { - return getlog('HEAD~5', 'HEAD'); + } catch (error) { + console.error(error); + + try { + return getlog('HEAD~5', 'HEAD'); + } catch (error_) { + console.error(error_); + + try { + return getlog('HEAD~1', 'HEAD'); + } catch (error__) { + console.error(error__); + + return []; + } + } } } function getCommits() { const io = - GIT_COMMIT === GIT_PREVIOUS_COMMIT + GIT_COMMIT && GIT_COMMIT === GIT_PREVIOUS_COMMIT ? [] : sortBy( Object.entries( diff --git a/packages/notify/package.json b/packages/notify/package.json index 479b9bd..741eb3a 100644 --- a/packages/notify/package.json +++ b/packages/notify/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/notify", - "version": "0.2.3", + "version": "0.2.4", "description": "Send releases notifications", "license": "MIT", "author": {