Skip to content

Commit

Permalink
feat: add support for ReleaseHub
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Nov 24, 2022
1 parent 85b96ea commit 409d886
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Officially supported CI servers:
| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 |
| [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` ||
| [Nevercode](http://nevercode.io/) | `ci.NEVERCODE` ||
| [ReleaseHub](https://releasehub.com/) | `ci.RELEASEHUB` ||
| [Render](https://render.com/) | `ci.RENDER` ||
| [Sail CI](https://sail.ci/) | `ci.SAIL` ||
| [Screwdriver](https://screwdriver.cd/) | `ci.SCREWDRIVER` ||
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const JENKINS: boolean;
export const MAGNUM: boolean;
export const NETLIFY: boolean;
export const NEVERCODE: boolean;
export const RELEASEHUB: boolean;
export const RENDER: boolean;
export const SAIL: boolean;
export const SCREWDRIVER: boolean;
Expand Down
16 changes: 16 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,22 @@ test('Sourcehit', function (t) {
t.end()
})

test('ReleaseHub', function (t) {
process.env.RELEASE_BUILD_ID = '1a'

clearModule('./')
const ci = require('./')

t.equal(ci.isCI, true)
t.equal(ci.name, 'ReleaseHub')
t.equal(ci.RELEASEHUB, true)
assertVendorConstants('RELEASEHUB', ci, t)

delete process.env.RELEASE_BUILD_ID

t.end()
})

function assertVendorConstants (expect, ci, t) {
ci._vendors.forEach(function (constant) {
let bool = constant === expect
Expand Down
5 changes: 5 additions & 0 deletions vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@
"env": "NEVERCODE",
"pr": { "env": "NEVERCODE_PULL_REQUEST", "ne": "false" }
},
{
"name": "ReleaseHub",
"constant": "RELEASEHUB",
"env": "RELEASE_BUILD_ID"
},
{
"name": "Render",
"constant": "RENDER",
Expand Down

0 comments on commit 409d886

Please sign in to comment.