@bitgenics/fab-upload-cli
Advanced tools
Comparing version 0.1.4 to 0.1.5
declare enum PLATFORMS { | ||
TRAVIS = "travis", | ||
BUILDKITE = "buildkite", | ||
CIRCLECI = "circleci" | ||
CIRCLECI = "circleci", | ||
GITLAB = "gitlab" | ||
} | ||
@@ -6,0 +7,0 @@ export declare const getCI: () => PLATFORMS | "unknown"; |
@@ -9,2 +9,3 @@ "use strict"; | ||
PLATFORMS["CIRCLECI"] = "circleci"; | ||
PLATFORMS["GITLAB"] = "gitlab"; | ||
})(PLATFORMS || (PLATFORMS = {})); | ||
@@ -15,3 +16,3 @@ /* | ||
exports.getCI = () => { | ||
const { TRAVIS, BUILDKITE, CIRCLECI } = process.env; | ||
const { TRAVIS, BUILDKITE, CIRCLECI, GITLAB_CI } = process.env; | ||
if (TRAVIS) { | ||
@@ -26,2 +27,5 @@ return PLATFORMS.TRAVIS; | ||
} | ||
if (GITLAB_CI) { | ||
return PLATFORMS.GITLAB; | ||
} | ||
return "unknown"; | ||
@@ -33,3 +37,3 @@ }; | ||
exports.getBranch = (platform) => { | ||
const { TRAVIS_BRANCH, BUILDKITE_BRANCH, CIRCLE_BRANCH } = process.env; | ||
const { TRAVIS_BRANCH, BUILDKITE_BRANCH, CIRCLE_BRANCH, CI_COMMIT_BRANCH } = process.env; | ||
switch (platform) { | ||
@@ -42,2 +46,4 @@ case PLATFORMS.TRAVIS: | ||
return CIRCLE_BRANCH; | ||
case PLATFORMS.GITLAB: | ||
return CI_COMMIT_BRANCH; | ||
default: | ||
@@ -51,3 +57,3 @@ return "unkown-branch"; | ||
exports.getRepo = (platform) => { | ||
const { TRAVIS_REPO_SLUG, BUILDKITE_REPO, CIRCLE_PROJECT_REPONAME } = process.env; | ||
const { TRAVIS_REPO_SLUG, BUILDKITE_REPO, CIRCLE_PROJECT_REPONAME, CI_PROJECT_TITLE } = process.env; | ||
switch (platform) { | ||
@@ -60,2 +66,4 @@ case PLATFORMS.TRAVIS: | ||
return CIRCLE_PROJECT_REPONAME; | ||
case PLATFORMS.GITLAB: | ||
return CI_PROJECT_TITLE; | ||
default: | ||
@@ -62,0 +70,0 @@ return "unknown-repo"; |
{ | ||
"name": "@bitgenics/fab-upload-cli", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"author": "Tom Trinca @plexey", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25774
577