예제 #1
0
func main() {
	defer glog.Flush()
	glog.CopyStandardLogTo("info")
	flag.Parse()
	runtime.GOMAXPROCS(runtime.NumCPU())

	httpClientBuilder := http_client_builder.New()
	httpClient := httpClientBuilder.Build()
	latestVersion := nexus_latest_version.New(httpClient.Get)
	urlByVersion := url_by_version.New()
	latestUrl := nexus_latest_tar_gz_url.New(latestVersion.LatestNexusVersion, urlByVersion.NexusZipUrlForVersion)

	commandListProvider := func() command_list.CommandList {
		return command_list.New()
	}
	copier := debian_copier.New()
	config_parser := debian_config_parser.New()
	zipExtractor := debian_zip_extractor.New()
	tarGzExtractor := debian_tar_gz_extractor.New()
	requestbuilderProvider := http_requestbuilder.NewHTTPRequestBuilderProvider()
	debianPackageCreator := debian_package_creator.New(commandListProvider, copier, tarGzExtractor.ExtractTarGz, zipExtractor.ExtractZip, httpClient.Do, requestbuilderProvider.NewHTTPRequestBuilder)
	creatorByReader := debian_package_creator_by_reader.New(commandListProvider, debianPackageCreator, tarGzExtractor.ExtractTarGz)
	latestDebianPackageCreator := debian_latest_package_creator.New(httpClient.Get, latestUrl.LatestNexusTarGzUrl, latestVersion.LatestNexusVersion, creatorByReader.CreatePackage)

	err := do(latestDebianPackageCreator.CreateLatestDebianPackage, config_parser.ParseFileToConfig, latestVersion.LatestNexusVersion, *configPtr)
	if err != nil {
		glog.Exit(err)
	}
}
예제 #2
0
func main() {
	defer glog.Flush()
	glog.CopyStandardLogTo("info")
	flag.Parse()
	runtime.GOMAXPROCS(runtime.NumCPU())

	writer := os.Stdout
	httpClientBuilder := http_client_builder.New()
	httpClient := httpClientBuilder.Build()
	latestVersion := latest_version.New(httpClient.Get)
	err := do(writer, latestVersion.LatestNexusVersion)
	if err != nil {
		glog.Exit(err)
	}
}
예제 #3
0
func main() {
	defer glog.Flush()
	glog.CopyStandardLogTo("info")
	flag.Parse()
	runtime.GOMAXPROCS(runtime.NumCPU())

	writer := os.Stdout
	httpClientBuilder := http_client_builder.New()
	httpClient := httpClientBuilder.Build()
	latestVersion := latest_version.New(httpClient.Get)
	urlByVersion := url_by_version.New()
	latestZipUrl := latest_tar_gz_url.New(latestVersion.LatestNexusVersion, urlByVersion.NexusZipUrlForVersion)
	err := do(writer, latestZipUrl.LatestNexusTarGzUrl)
	if err != nil {
		glog.Exit(err)
	}
}