Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
feat(build): add build name
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Jun 17, 2020
1 parent a423dd0 commit 85a0592
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ const config = convict({
default: '',
env: 'ARGOS_BATCH_COUNT',
},
name: {
doc: 'Build name',
format: String,
default: '',
env: 'ARGOS_BUILD_NAME',
},
})

const NODE_ENV = process.env.NODE_ENV || 'development'
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ program
'Number of batches expected (batch mode)',
parseInt,
)
.option('--name [string]', 'Name of the build')
.option(
'--ignore <list>',
'List of glob files to ignore (ex: "**/*.png,**/diff.jpg")',
Expand Down
3 changes: 3 additions & 0 deletions src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ async function upload(options) {
branch: branchOption,
commit: commitOption,
externalBuildId: externalBuildIdOption,
name: nameOption,
batchCount: batchCountOption,
} = options

Expand All @@ -34,6 +35,7 @@ async function upload(options) {
externalBuildIdOption ||
config.get('externalBuildId') ||
environment.externalBuildId
const name = nameOption || config.get('name') || environment.name
const batchCount =
batchCountOption || config.get('batchCount') || environment.batchCount

Expand Down Expand Up @@ -86,6 +88,7 @@ async function upload(options) {
body.append(
'data',
JSON.stringify({
name,
branch,
commit,
token,
Expand Down

0 comments on commit 85a0592

Please sign in to comment.