Skip to content

Commit 85b96ea

Browse files
committed
feat: add support for sorucehut
1 parent 199a0cb commit 85b96ea

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Officially supported CI servers:
6868
| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` ||
6969
| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` ||
7070
| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` ||
71+
| [Sourcehut](https://sourcehut.org/) | `ci.SOURCEHUT` | 🚫 |
7172
| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 |
7273
| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 |
7374
| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 |

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const SCREWDRIVER: boolean;
6161
export const SEMAPHORE: boolean;
6262
export const SHIPPABLE: boolean;
6363
export const SOLANO: boolean;
64+
export const SOURCEHUT: boolean;
6465
export const STRIDER: boolean;
6566
export const TASKCLUSTER: boolean;
6667
export const TEAMCITY: boolean;

test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,22 @@ test('Heroku', function (t) {
893893
t.end()
894894
})
895895

896+
test('Sourcehit', function (t) {
897+
process.env.CI_NAME = 'sourcehut'
898+
899+
clearModule('./')
900+
const ci = require('./')
901+
902+
t.equal(ci.isCI, true)
903+
t.equal(ci.name, 'Sourcehut')
904+
t.equal(ci.SOURCEHUT, true)
905+
assertVendorConstants('SOURCEHUT', ci, t)
906+
907+
delete process.env.CI_NAME
908+
909+
t.end()
910+
})
911+
896912
function assertVendorConstants (expect, ci, t) {
897913
ci._vendors.forEach(function (constant) {
898914
let bool = constant === expect

vendors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@
197197
"env": "TDDIUM",
198198
"pr": "TDDIUM_PR_ID"
199199
},
200+
{
201+
"name": "Sourcehut",
202+
"constant": "SOURCEHUT",
203+
"env": { "CI_NAME": "sourcehut" }
204+
},
200205
{
201206
"name": "Strider CD",
202207
"constant": "STRIDER",

0 commit comments

Comments
 (0)