2017-02-06 13:40:28 -05:00
|
|
|
// Imports
|
2018-05-10 08:56:07 -04:00
|
|
|
import {AIO_DOWNLOADS_DIR} from '../common/constants';
|
|
|
|
import {
|
|
|
|
AIO_ARTIFACT_PATH,
|
|
|
|
AIO_BUILDS_DIR,
|
|
|
|
AIO_CIRCLE_CI_TOKEN,
|
|
|
|
AIO_DOMAIN_NAME,
|
|
|
|
AIO_GITHUB_ORGANIZATION,
|
|
|
|
AIO_GITHUB_REPO,
|
|
|
|
AIO_GITHUB_TEAM_SLUGS,
|
|
|
|
AIO_GITHUB_TOKEN,
|
|
|
|
AIO_SIGNIFICANT_FILES_PATTERN,
|
|
|
|
AIO_TRUSTED_PR_LABEL,
|
|
|
|
AIO_UPLOAD_HOSTNAME,
|
|
|
|
AIO_UPLOAD_MAX_SIZE,
|
|
|
|
AIO_UPLOAD_PORT,
|
|
|
|
} from '../common/env-variables';
|
|
|
|
import {UploadServerFactory} from './upload-server-factory';
|
2017-02-06 13:40:28 -05:00
|
|
|
|
|
|
|
// Run
|
|
|
|
_main();
|
|
|
|
|
|
|
|
// Functions
|
2018-08-10 06:10:22 -04:00
|
|
|
function _main(): void {
|
2018-05-10 08:56:07 -04:00
|
|
|
UploadServerFactory
|
|
|
|
.create({
|
|
|
|
buildArtifactPath: AIO_ARTIFACT_PATH,
|
2017-02-28 14:10:46 -05:00
|
|
|
buildsDir: AIO_BUILDS_DIR,
|
2018-05-10 08:56:07 -04:00
|
|
|
circleCiToken: AIO_CIRCLE_CI_TOKEN,
|
2017-03-01 17:04:03 -05:00
|
|
|
domainName: AIO_DOMAIN_NAME,
|
2018-05-10 08:56:07 -04:00
|
|
|
downloadSizeLimit: AIO_UPLOAD_MAX_SIZE,
|
|
|
|
downloadsDir: AIO_DOWNLOADS_DIR,
|
|
|
|
githubOrg: AIO_GITHUB_ORGANIZATION,
|
|
|
|
githubRepo: AIO_GITHUB_REPO,
|
2017-02-28 14:10:46 -05:00
|
|
|
githubTeamSlugs: AIO_GITHUB_TEAM_SLUGS.split(','),
|
|
|
|
githubToken: AIO_GITHUB_TOKEN,
|
2018-05-10 08:56:07 -04:00
|
|
|
significantFilesPattern: AIO_SIGNIFICANT_FILES_PATTERN,
|
2017-06-18 18:15:07 -04:00
|
|
|
trustedPrLabel: AIO_TRUSTED_PR_LABEL,
|
2018-05-10 08:56:07 -04:00
|
|
|
})
|
|
|
|
.listen(AIO_UPLOAD_PORT, AIO_UPLOAD_HOSTNAME);
|
2017-02-06 13:40:28 -05:00
|
|
|
}
|