Skip to content

Commit 0d7a684

Browse files
committed
Fix for deployments that do not have a description
1 parent ebef158 commit 0d7a684

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

create-deployment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ exports.createDeployment = async function(applicationName, fullRepositoryName, b
8787

8888
var matches, lastAttemptedDeploymentRunNumber;
8989

90-
if (matches = lastAttemptedDeploymentDescription.match(/run_number=(\d+)/)) {
90+
if (lastAttemptedDeploymentDescription && (matches = lastAttemptedDeploymentDescription.match(/run_number=(\d+)/))) {
9191
lastAttemptedDeploymentRunNumber = matches[1];
9292
if (parseInt(lastAttemptedDeploymentRunNumber) > parseInt(runNumber)) {
9393
core.setFailed(`🙅‍♂️ The last attempted deployment as returned by the AWS API has been created by a higher run number ${lastAttemptedDeploymentRunNumber}, this is run number ${runNumber}. Aborting.`);

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ exports.createDeployment = async function(applicationName, fullRepositoryName, b
103103

104104
var matches, lastAttemptedDeploymentRunNumber;
105105

106-
if (matches = lastAttemptedDeploymentDescription.match(/run_number=(\d+)/)) {
106+
if (lastAttemptedDeploymentDescription && (matches = lastAttemptedDeploymentDescription.match(/run_number=(\d+)/))) {
107107
lastAttemptedDeploymentRunNumber = matches[1];
108108
if (parseInt(lastAttemptedDeploymentRunNumber) > parseInt(runNumber)) {
109109
core.setFailed(`🙅‍♂️ The last attempted deployment as returned by the AWS API has been created by a higher run number ${lastAttemptedDeploymentRunNumber}, this is run number ${runNumber}. Aborting.`);

0 commit comments

Comments
 (0)