Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug #292

Merged
merged 4 commits into from
Feb 10, 2023
Merged

debug #292

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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