Skip to content

Commit 897e325

Browse files
committed
fix(brew): update s3 function to grab aws creds by profile
1 parent 8423d08 commit 897e325

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

release/scripts/homebrew.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,16 @@ async function uploadToS3(file) {
7878
}
7979
});
8080
fileStream.on('open', () => {
81-
console.log(AWS.config.credentials)
82-
const S3 = new AWS.S3({ credentials: AWS.config.credentials })
81+
const credentials = new AWS.SharedIniFileCredentials({
82+
profile: 'autocloud-iac',
83+
callback: (err) => {
84+
if (err) {
85+
this.logger.error(`No credentials found for profile ${profile}`)
86+
}
87+
},
88+
})
89+
console.log(credentials)
90+
const S3 = new AWS.S3({ credentials: credentials })
8391
S3.putObject({
8492
Bucket: PJSON.oclif.update.s3.bucket,
8593
Key: `cg-v${SHORT_VERSION}/${file}`,

0 commit comments

Comments
 (0)