Explorar el Código

Download releases from public repo in CLI (#14)

Mauricio Araujo hace 2 años
padre
commit
e5573b29c8
Se han modificado 2 ficheros con 3 adiciones y 7 borrados
  1. 2 5
      cli/cmd/commands/server.go
  2. 1 2
      cli/cmd/config/docker.go

+ 2 - 5
cli/cmd/commands/server.go

@@ -55,7 +55,6 @@ func registerCommand_Server(cliConf config.CLIConfig) *cobra.Command {
 					_, _ = red.Println("Shutting down...")
 
 					err = stopDocker(ctx)
-
 					if err != nil {
 						_, _ = red.Println("Shutdown unsuccessful:", err.Error())
 					}
@@ -224,7 +223,6 @@ func startLocal(
 	cmdPorter.Stderr = os.Stderr
 
 	err = cmdPorter.Run()
-
 	if err != nil {
 		color.New(color.FgRed).Println("Failed:", err.Error())
 		os.Exit(1)
@@ -240,7 +238,6 @@ func stopDocker(ctx context.Context) error {
 	}
 
 	err = agent.StopPorterContainersWithProcessID(ctx, "main", false)
-
 	if err != nil {
 		return err
 	}
@@ -259,7 +256,7 @@ func downloadMatchingRelease(ctx context.Context, porterDir string) error {
 		ZipFolderDest:       porterDir,
 		ZipName:             "portersvr_latest.zip",
 		EntityID:            "porter-dev",
-		RepoName:            "porter",
+		RepoName:            "porter-archive",
 		IsPlatformDependent: true,
 		Downloader: &github.ZIPDownloader{
 			ZipFolderDest:   porterDir,
@@ -279,7 +276,7 @@ func downloadMatchingRelease(ctx context.Context, porterDir string) error {
 		ZipFolderDest:       porterDir,
 		ZipName:             "static_latest.zip",
 		EntityID:            "porter-dev",
-		RepoName:            "porter",
+		RepoName:            "porter-archive",
 		IsPlatformDependent: false,
 		Downloader: &github.ZIPDownloader{
 			ZipFolderDest:   porterDir,

+ 1 - 2
cli/cmd/config/docker.go

@@ -57,7 +57,6 @@ func SetDockerConfig(ctx context.Context, client api.Client, pID uint) error {
 
 	if _, err := os.Stat(dockerDir); os.IsNotExist(err) {
 		err = os.Mkdir(dockerDir, 0o700)
-
 		if err != nil {
 			return err
 		}
@@ -183,7 +182,7 @@ func downloadCredMatchingRelease(ctx context.Context) error {
 		ZipFolderDest:       filepath.Join(home, ".porter"),
 		ZipName:             "docker-credential-porter_latest.zip",
 		EntityID:            "porter-dev",
-		RepoName:            "porter",
+		RepoName:            "porter-archive",
 		IsPlatformDependent: true,
 		Downloader: &github.ZIPDownloader{
 			ZipFolderDest:   filepath.Join(home, ".porter"),