1
0
mirror of https://github.com/bigchaindb/site.git synced 2025-02-14 21:10:28 +01:00
This commit is contained in:
Matthias Kretschmann 2018-02-01 11:30:29 +01:00
parent bc756270c7
commit f56b7068c2
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -365,35 +365,31 @@ export default dev
// gulp deploy --beta
// gulp deploy --gamma
//
export const s3 = () => {
// create publisher, define config
if ($.util.env.live === true) {
// create publisher, define config
if ($.util.env.live === true) {
var publisher = $.awspublish.create({
params: { 'Bucket': S3BUCKET },
'accessKeyId': process.env.AWS_ACCESS_KEY,
'secretAccessKey': process.env.AWS_SECRET_KEY,
'region': S3REGION
})
} else if ($.util.env.beta === true) {
} else if ($.util.env.beta === true) {
var publisher = $.awspublish.create({
params: { 'Bucket': S3BUCKET_BETA },
'accessKeyId': process.env.AWS_BETA_ACCESS_KEY,
'secretAccessKey': process.env.AWS_BETA_SECRET_KEY,
'region': S3REGION_BETA
})
} else if ($.util.env.gamma === true) {
} else if ($.util.env.gamma === true) {
var publisher = $.awspublish.create({
params: { 'Bucket': S3BUCKET_GAMMA },
'accessKeyId': process.env.AWS_GAMMA_ACCESS_KEY,
'secretAccessKey': process.env.AWS_GAMMA_SECRET_KEY,
'region': S3REGION_GAMMA
})
} else {
return
}
}
return src(DIST + '**/*')
export const s3 = () => src(DIST + '**/*')
.pipe($.awspublishRouter({
cache: {
// cache for 5 minutes by default
@ -442,7 +438,7 @@ export const s3 = () => {
},
// pass-through for anything that wasn't matched by routes above, to be uploaded with default options
"^.+$": "$&"
'^.+$': '$&'
}
}))
// Make sure everything goes to the root '/'
@ -454,7 +450,6 @@ export const s3 = () => {
.pipe($.awspublish.reporter({
states: ['create', 'update', 'delete']
}))
}
//