Skip to content
Permalink
Browse files

feat: add support for gitlab ci pipeline ids as buildNumber (#3838)

uses the CI_PIPELINE_IID (no typo, this is the project scoped id of the
currently running pipeline)
  • Loading branch information...
jreinert authored and develar committed May 9, 2019
1 parent 7d5f952 commit 09726952278c9977f81a530a10e9f87dcbfcc756
Showing with 4 additions and 4 deletions.
  1. +2 −2 packages/app-builder-lib/src/appInfo.ts
  2. +2 −2 packages/app-builder-lib/src/configuration.ts
@@ -22,7 +22,7 @@ export class AppInfo {
buildVersion = info.config.buildVersion
}

this.buildNumber = process.env.BUILD_NUMBER || process.env.TRAVIS_BUILD_NUMBER || process.env.APPVEYOR_BUILD_NUMBER || process.env.CIRCLE_BUILD_NUM || process.env.BUILD_BUILDNUMBER
this.buildNumber = process.env.BUILD_NUMBER || process.env.TRAVIS_BUILD_NUMBER || process.env.APPVEYOR_BUILD_NUMBER || process.env.CIRCLE_BUILD_NUM || process.env.BUILD_BUILDNUMBER || process.env.CI_PIPELINE_IID
if (buildVersion == null) {
buildVersion = this.version
if (!isEmptyOrSpaces(this.buildNumber)) {
@@ -144,4 +144,4 @@ export function smarten(s: string): string {
// closing doubles
s = s.replace(/"/g, "\u201d")
return s
}
}
@@ -120,7 +120,7 @@ export interface Configuration extends PlatformSpecificBuildOptions {

/**
* The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`.
* If `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_NUMBER` or `bamboo.buildNumber` env defined, it will be used as a build version (`version.build_number`).
* If `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_NUMBER` or `bamboo.buildNumber` or `CI_PIPELINE_IID` env defined, it will be used as a build version (`version.build_number`).
*/
readonly buildVersion?: string | null

@@ -270,4 +270,4 @@ export interface MetadataDirectories {
* The application directory (containing the application package.json), defaults to `app`, `www` or working directory.
*/
readonly app?: string | null
}
}

0 comments on commit 0972695

Please sign in to comment.
You can’t perform that action at this time.