Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Fix detection of dependencies to deploy #1141

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

spalladino
Copy link
Contributor

The hasDependenciesForDeploy method, used to check whether to ask the user if they wanted to deploy dependencies, used a different criteria to that of the NetworkController.

public async deployDependencyIfNeeded(depName: string, depVersion: string): Promise<void | never> {
try {
const dependency = new Dependency(depName, depVersion);
if (dependency.isDeployedOnNetwork(this.network) || this.networkFile.dependencyHasMatchingCustomDeploy(depName))
return;

This PR changes the criteria in Dependency so the user is only prompted if the controller would deploy anything. Note that the controller fails to check for version mismatch, which required skipping a test, but that's a different bug to address.

@spalladino spalladino requested a review from ylv-io July 22, 2019 14:45
@spalladino spalladino force-pushed the fix/dependencies-to-deploy branch from b91d875 to a25cdd7 Compare July 22, 2019 17:46
Copy link
Contributor

@ylv-io ylv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor of linkedDependencies

@spalladino spalladino merged commit 443203a into master Jul 22, 2019
@spalladino spalladino deleted the fix/dependencies-to-deploy branch July 26, 2019 17:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants