Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Release v0.2.0 #14

Merged
merged 3 commits into from
Oct 16, 2024
Merged
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# KOPS Command Line Tool
# ZOP.DEV Command Line Tool

The Kops-cli provides the functionality to deploy your applications seamlessly on
cloud using kops - simplified devops.
The zop.dev cli provides the functionality to deploy your applications seamlessly on
cloud using zop.dev - simplified devops.

To install the cli app run the following command
```
go install kops.dev@latest //to get the latest release for kops cli
go install zop.dev@latest //to get the latest release for zop.dev cli
```

or clone the repo and build binary
```bash
git clone https://github.com/kops-dev/kops-cli

go build -o kops.dev .
go build -o zop.dev .
```
8 changes: 4 additions & 4 deletions client/deploy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ import (

"gofr.dev/pkg/gofr"

kopsClient "kops.dev/client"
"kops.dev/models"
zopClient "zop.dev/client"
"zop.dev/models"
)

const (
imageZipName = "temp/image.zip"
)

var (
errUpdatingImage = errors.New("unable to update the image for your service via kops.dev services")
errUpdatingImage = errors.New("unable to update the image for your service via zop.dev services")
)

type client struct {
}

func New() kopsClient.ServiceDeployer {
func New() zopClient.ServiceDeployer {
return &client{}
}

Expand Down
2 changes: 1 addition & 1 deletion client/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package client

import (
"gofr.dev/pkg/gofr"
"kops.dev/models"
"zop.dev/models"
)

type ServiceDeployer interface {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module kops.dev
module zop.dev

go 1.22

Expand Down
14 changes: 7 additions & 7 deletions handler/deploy/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (

"gofr.dev/pkg/gofr"

"kops.dev/models"
"kops.dev/service"
"zop.dev/models"
"zop.dev/service"
)

var (
errDepKeyNotProvided = errors.New("KOPS_DEPLOYMENT_KEY not provided, " +
"please download the key form https://kops.dev and navigating to your service deployment guide lines for CLI deployment")
errDepKeyNotProvided = errors.New("ZOP_DEPLOYMENT_KEY not provided, " +
"please download the key from https://zop.dev and navigating to your service deployment guide lines for CLI deployment")
errIncorrectDepKey = errors.New("unable to validate the deployment key, please make sure the key contents of key are correct" +
"Please download the key form https://kops.dev and navigating to your service deployment guide lines for CLI deployment")
errDeploymentFailed = errors.New("some unexpected error occurred while deploying your service using kops.dev")
"Please download the key from https://zop.dev and navigating to your service deployment guide lines for CLI deployment")
errDeploymentFailed = errors.New("some unexpected error occurred while deploying your service using zop.dev")
)

type Handler struct {
Expand All @@ -31,7 +31,7 @@ func New(svc service.Deployer) *Handler {
func (h *Handler) Deploy(ctx *gofr.Context) (any, error) {
var img models.Image

keyFile := os.Getenv("KOPS_DEPLOYMENT_KEY")
keyFile := os.Getenv("ZOP_DEPLOYMENT_KEY")
if keyFile == "" {
return nil, errDepKeyNotProvided
}
Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"gofr.dev/pkg/gofr"

depClient "kops.dev/client/deploy"
depHndler "kops.dev/handler/deploy"
deploySvc "kops.dev/service/deploy"
dockerSvc "kops.dev/service/docker"
depClient "zop.dev/client/deploy"
depHndler "zop.dev/handler/deploy"
deploySvc "zop.dev/service/deploy"
dockerSvc "zop.dev/service/docker"
)

func main() {
Expand All @@ -20,8 +20,8 @@ func main() {
depHandler := depHndler.New(depSvc)

app.SubCommand("version", func(_ *gofr.Context) (interface{}, error) {
return "kops cli version " + version, nil
}, gofr.AddDescription("displays the installed kops version"))
return "zop.dev cli version " + version, nil
}, gofr.AddDescription("displays the installed zop.dev cli version"))

app.SubCommand("deploy", depHandler.Deploy,
gofr.AddDescription("builds and deploy code using a single command"))
Expand Down
6 changes: 3 additions & 3 deletions service/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"gofr.dev/pkg/gofr"
"golang.org/x/sync/errgroup"

"kops.dev/client"
"kops.dev/models"
"kops.dev/service"
"zop.dev/client"
"zop.dev/models"
"zop.dev/service"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions service/deploy/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gofr.dev/pkg/gofr"

"kops.dev/models"
"zop.dev/models"
)

const (
Expand Down Expand Up @@ -47,7 +47,7 @@ func createDockerFile(ctx *gofr.Context, lang string) error {

fmt.Printf("creating DockerFile for %s is not supported yet, "+
"reach us at https://github.com/kops-dev/kops-cli/issues to know more\n", lang)
fmt.Println("you can create your own DockerFile and run the kops-cli again.")
fmt.Println("you can create your own DockerFile and run the zop.dev cli again.")

return errLanguageNotSupported
}
Expand Down
6 changes: 3 additions & 3 deletions service/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
"github.com/docker/docker/pkg/archive"
"gofr.dev/pkg/gofr"

"kops.dev/models"
kopsSvc "kops.dev/service"
"zop.dev/models"
zopSvc "zop.dev/service"
)

type service struct {
docker *client.Client
}

func New() kopsSvc.DockerClient {
func New() zopSvc.DockerClient {
c, err := client.NewClientWithOpts(
client.WithHost("unix:///Users/raramuri/.colima/default/docker.sock"),
client.WithAPIVersionNegotiation(),
Expand Down
2 changes: 1 addition & 1 deletion service/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package service

import (
"gofr.dev/pkg/gofr"
"kops.dev/models"
"zop.dev/models"
)

type Deployer interface {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const version = "v0.1.0"
const version = "v0.2.0"
Loading