-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
Copy paths3ProjectConfig.js
65 lines (59 loc) · 1.78 KB
/
s3ProjectConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
function fileMap(revision, date) {
let filesToPublish = {
'../docs/data.json': fileObject('ember-docs', '.json', 'application/json', revision, date),
};
let version = require('../package').version;
filesToPublish[`../ember-source-${version}.tgz`] = {
contentType: 'application/x-gzip',
destinations: {
alpha: [`alpha/daily/${date}.tgz`, `alpha/shas/${revision}.tgz`],
canary: [`canary/daily/${date}.tgz`, `canary/shas/${revision}.tgz`],
beta: [`beta/daily/${date}.tgz`, `beta/shas/${revision}.tgz`],
release: [`release/daily/${date}.tgz`, `release/shas/${revision}.tgz`],
},
};
filesToPublish['../build-metadata.json'] = {
contentType: 'application/json',
destinations: {
alpha: ['alpha.json'],
canary: ['canary.json'],
beta: ['beta.json'],
release: ['release.json'],
},
};
return filesToPublish;
}
function fileObject(baseName, extension, contentType, currentRevision, date) {
let fullName = '/' + baseName + extension;
let obj = {
contentType: contentType,
destinations: {
alpha: [
'alpha' + fullName,
'alpha/daily/' + date + fullName,
'alpha/shas/' + currentRevision + fullName,
],
canary: [
'latest' + fullName,
'canary' + fullName,
'canary/daily/' + date + fullName,
'canary/shas/' + currentRevision + fullName,
],
release: [
'stable' + fullName,
'release' + fullName,
'release/daily/' + date + fullName,
'release/shas/' + currentRevision + fullName,
],
beta: [
'beta' + fullName,
'beta/daily/' + date + fullName,
'beta/shas/' + currentRevision + fullName,
],
wildcard: [],
},
};
return obj;
}
module.exports = fileMap;