package tasks.mine;

import io.Reader;
import io.Writer;
import main.Config;
import tasks.mine.queries.ReleasesQuery;

/**
 * Queries releases statistics (if there is was at least a commit in the last
 * year)
 * 
 * @author Lisa Nguyen Quang Do
 */

public class Releases {
	public void run(String target) {
		Writer writer = new Writer(Config.resultFile, target);
		Reader reader = new Reader(Config.resultFile, target);

		ReleasesQuery releasesQuery = new ReleasesQuery(writer, reader);
		if (releasesQuery.queryReleases())
			System.out.println("Releases finished");
		else
			System.out.println("Releases failed");
	}
}
