Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit ec0cb8a

Browse files
committed
runProjectStatus: Add UPSTREAM VERSION EXISTS
1 parent d9a44ba commit ec0cb8a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmd/dep/status.go

+14
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,20 @@ func runProjectStatus(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.Source
727727
return err
728728
}
729729
projStatus.UpstreamExists = existsUpstream
730+
731+
// Update local copy of the source and then fetch all the versions.
732+
sm.SyncSourceFor(pl.Ident())
733+
pvs, err := sm.ListVersions(pl.Ident())
734+
if err != nil {
735+
return err
736+
}
737+
738+
for _, pv := range pvs {
739+
if pv.Unpair().String() == pl.Version().String() {
740+
projStatus.UpstreamVersionExists = true
741+
break
742+
}
743+
}
730744
}
731745
}
732746

0 commit comments

Comments
 (0)