anchor.diff:      });
     }
   
  +  Future<bool> _hasCommitsSince(GitDir gitDir, Version sinceVersion) async {
  +    return (await commitCountSince(gitDir, sinceVersion.toString())) > 0;
  +  }
  +
     @override
     ProjectCommand release({ReleaseType type: ReleaseType.minor}) {
       return projectCommandWithDependencies('Release version type $type',
           (Project project, Set<Project> dependencies) async {
         final GitDir gitDir = await project.gitDir;
  +
  +      final currentPubspecVersion = project.pubspec.version;
  +
  +      final Version latestTaggedVersion =
  +          (await _gitFeature.getReleaseVersionTags().process(project)).last;
  +
         final Option<HostedPackageVersions> publishedVersionsOpt =
             await _pub.fetchPackageVersions().process(project);
   
  
positive.code:           .map((HostedPackageVersions versions) => versions.latest.version);
  
        if (latestPublishedVersionOpt is Some) {
          // hosted package
          // check if version has changed
          //   if not then check diff from version tag
          //     if different then ERROR. hosted packages must be manually bumped
  
          final latestPublishedVersion = latestPublishedVersionOpt.get();
          final currentPubspecVersion = project.pubspec.version;
          if (latestPublishedVersion < currentPubspecVersion) {
            // ok can publish
  
            await _pub.publish().process(project);
          } else {
            final hasChangesSinceLastPublish = (await commitCountSince(
                    gitDir, currentPubspecVersion.toString())) >
                0;
  
            if (hasChangesSinceLastPublish /* &&
                latestPublishedVersion == currentPubspecVersion */
  
negative.code:       }
      });
    }
  
    Future<Option<Version>> _getReleaseVersion(Version latestTaggedVersion,
        Version currentPubspecVersion, GitDir gitDir, ReleaseType type) async {
      if (latestTaggedVersion > currentPubspecVersion) {
        throw new StateError('the latest tagged version $latestTaggedVersion'
            ' is greater than the current pubspec version $currentPubspecVersion');
      } else {
        if (latestTaggedVersion < currentPubspecVersion) {
          // manually bumped version
          return await new Some(currentPubspecVersion);
        } else {
          final hasChangesSinceLatestTaggedVersion =
              await _hasCommitsSince(gitDir, latestTaggedVersion);
  
          if (hasChangesSinceLatestTaggedVersion) {
            return new Some(type.bump(currentPubspecVersion));
          } else {
            return const None();
          }
        }
      }
    }
  }
  