Skip to content

Commit

Permalink
feat: add support for gitlab ci pipeline ids as buildNumber (#3838)
Browse files Browse the repository at this point in the history
uses the CI_PIPELINE_IID (no typo, this is the project scoped id of the
currently running pipeline)
  • Loading branch information
Joakim Reinert authored and develar committed May 9, 2019
1 parent 7d5f952 commit 0972695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/appInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -144,4 +144,4 @@ export function smarten(s: string): string {
// closing doubles
s = s.replace(/"/g, "\u201d")
return s
}
}
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.