()
| 3 | |
| 4 | // eslint-disable-next-line require-await |
| 5 | const main = async () => { |
| 6 | const integrationInfo = readIntegrationInfo(); |
| 7 | if (integrationInfo.airnodeType === 'local') { |
| 8 | cliPrint.error('You only need to run this script if you deploy on a cloud provider'); |
| 9 | return; |
| 10 | } |
| 11 | |
| 12 | // Use a command-line provided image name if a command line arg was passed (developer convenience). |
| 13 | // Otherwise, use the version from package.json. |
| 14 | const specificImage = process.argv.slice(2); |
| 15 | const packageVersion = readPackageVersion(); |
| 16 | const imageName = specificImage.length === 1 ? specificImage : `api3/airnode-deployer:${packageVersion}`; |
| 17 | |
| 18 | const integrationPath = join(__dirname, '../../integrations', integrationInfo.integration); |
| 19 | const deployCommand = [ |
| 20 | `docker run -it --rm`, |
| 21 | isWindows() ? '' : `-e USER_ID=$(id -u) -e GROUP_ID=$(id -g)`, |
| 22 | `-v ${integrationPath}:/app/config`, |
| 23 | `${imageName} deploy --debug`, |
| 24 | ] |
| 25 | .filter(Boolean) |
| 26 | .join(' '); |
| 27 | |
| 28 | runShellCommand(deployCommand); |
| 29 | }; |
| 30 | |
| 31 | runAndHandleErrors(main); |
nothing calls this directly
no test coverage detected