Skip to content

Commit

Permalink
Merge pull request #292 from aziontech/test-debug
Browse files Browse the repository at this point in the history
debug
  • Loading branch information
PatrickMenoti authored Feb 10, 2023
2 parents 8580430 + fd7ef07 commit cd35c0b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/aziontech/azion-cli
go 1.17

require (
github.com/aziontech/azionapi-go-sdk v0.22.0
github.com/MaxwelMazur/tablecli v0.0.0-20230208145104-c9458b902b58
github.com/aziontech/azionapi-go-sdk v0.22.0
github.com/fatih/color v1.13.0
github.com/go-git/go-git/v5 v5.4.2
github.com/spf13/cobra v1.6.1
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/storage_api/storage_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package storageapi

import (
"context"
"fmt"
"net/http"
"time"

Expand Down Expand Up @@ -43,6 +44,8 @@ func (c *Client) CreateVersionId(ctx context.Context, id string) (VersionIdRespo

res, httpResp, err := req.Execute()
if err != nil {
fmt.Println(err)
fmt.Println(httpResp.Body)
return nil, utils.ErrorPerStatusCode(httpResp, err)
}

Expand Down
7 changes: 7 additions & 0 deletions pkg/cmd/edge_applications/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,19 @@ func writeWebdevEnvFile(cmd *BuildCmd, path string, envs []string) error {

func GetVersionID(cmd *BuildCmd, appID string) (string, error) {

fmt.Println("STAGE URL")
fmt.Println(cmd.f.Config.GetString("storage_url"))

fmt.Println("API URL")
fmt.Println(cmd.f.Config.GetString("api_url"))

client := api.NewClient(cmd.f.HttpClient, cmd.f.Config.GetString("storage_url"), cmd.f.Config.GetString("token"))

ctx := context.Background()

verId, err := client.CreateVersionId(ctx, appID)
if err != nil {
fmt.Println(err)
return "", fmt.Errorf(msg.ErrorGetVersionId.Error(), err)
}

Expand Down

0 comments on commit cd35c0b

Please sign in to comment.