Skip to content

Commit

Permalink
Fixed execution scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
steegecs committed Aug 29, 2022
1 parent e7ac740 commit 7c83b69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions deployment/deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ if (
);
} else if (!args.subgraph || !args.location) {
console.log("Please provide at least --SUBGRAPH and --LOCATION");
} else if (
args.type &&
!["build", "deploy"].includes(args.type.toLowerCase())
) {
} else if (!["build", "deploy", ""].includes(args.type.toLowerCase())) {
console.log("Please provide --TYPE=build or --TYPE=deploy");
} else if (args.subgraph && args.protocol && args.network && args.location) {
if (args.subgraph in protocolNetworkMap == false) {
Expand Down
8 changes: 3 additions & 5 deletions deployment/execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ function scripts(protocol, network, template, location, constants, type) {
scripts.push(codegen);

// Null value for type assumes you want to deploy
if (type == null) {
if (["deploy", ""].includes(type.toLowerCase())) {
scripts.push(deployment);
} else if (type == "deploy") {
scripts.push(deployment);
} else if (type == "build") {
} else if (type.toLowerCase() == "build") {
scripts.push(build);
} else {
console.log("Error: invalid type - Neither build nor deploy");
Expand Down Expand Up @@ -133,7 +131,7 @@ async function runCommands(allScripts, results, args, callback) {
scriptIndex ==
allScripts.get(allDeployments[deploymentIndex]).length
) {
if ((args.type = "build")) {
if (args.type == "build") {
results +=
"Build Successful: " + allDeployments[deploymentIndex] + "\n";
} else {
Expand Down

0 comments on commit 7c83b69

Please sign in to comment.